[GIS] How would you use change the projection within KML file

kmlproj

I have created some KML files by converting the projection with both ARC and MapWindow.
I'm looking for ways to automate exporting the data from our application with coordinates in State Plane "ESRI:102272" to something that can be used in Google Earth.

While I'm not a GIS Pro or a Web Developer, I know just enough to export and create maps.

I'm looking to create some kml files to share on our webserver. Can proj4js be used to convert the coordinates within the file?

Any thoughts on this process would be greatly appreciated.

Best Answer

You can use OGR to convert to a kml. I assume (not totally sure) that reprojection is inherent because kml always has to be in EPSG:4326. Use:

ogr2ogr -f kml -t_srs EPSG:4326 output.kml input.shp

You may/may not need -t_srs EPSG:4326. You can use this call in a batch script to generate your kml files.

If you just want to reproject the points, then you cs2cs or gdaltransform (which is a wrapper for cs2cs that accepts more than just proj.4 strings.

www.gdal.org

Related Question