[GIS] Moving whole Google Earth path

google earthkml

I have a KML-file with a path in Google Earth that is slightly displaced. And I don't want to move each coordinate manually.

How can I move all of the coordinates together?

I think this site is using the same kml as I do. It depicts a city wall that is off. It should be moved like 100meters to the south so it don't crosses the major road that is north of it (as it does now). Or if you want to be more precise, each nod is of by longitude 0,000182 and lattitude 0,001217 if my calculation is right.

Best Answer

You could do this using ogr2ogr, with the help of a sql query parsed through spatialite.

ogr2ogr translated_kml.kml original.kml -dialect sqlite -sql "SELECT ShiftCoordinates(geometry,x,y) FROM world"

Where x and y are what you want to shift by, in the units of the kml file.

Related Question