views:

33

answers:

2

Hello due to reasons of chinese paranoia and google being a bunch of pansies I am in the situation where I need to alter a number of gps waypoints stored in a gpx file so they are are correctly aligned with google map which is not correctly aligned... for reasons for aforementioned paranoia.

So I have a waypoint with a known landmark (railyway station) I can see that landmark on the google map, I would like to be able to move the waypoint in my gpx file to the new the one on the map and have all the other waypoints adjust accordingly.

This could be achieved by creating a new waypoint over the station on the map and calculating and then applying the difference or with some kind of GUI drag and drop.

I have no idea how to go about this and wonder if anyone knows of a decent solution other than persuading google to stop being pansies....

Of course google could change their magic misalignment randomly and then I'm truely screwed but hey ho.

A: 

Well you could build a small web app that takes your GPX track and overlays it on google maps. Then write some code to let the user enter some number of "corrected pairs" where they click on the GPX point and then the point on google maps. Once they have done this for n number of points, where n is the number of points you want to achieve accuracy, you can calculate an average errorX and errorY. Then you can go about and for each GPX point do X + errorX and Y + errorY which should be good on average.

Does that make sense?

TheSteve0
A: 

Thanks for the reply TheSteveO I'd forgotten about this, in the end I used the rather handy javascript library provided here

http://www.movable-type.co.uk/scripts/latlong.html

To build myself a simple command line script which loads and realigns all the coordinates based on, as you suggested the difference between a known point on google maps and a waypoint of the same place.

I did attempt to implement it in php but unfortunately ran into a slew of floating point math problems and being pressed for time just went the javascript route.

dageshi