I am working on this SHP file, containing geographical district of Hong Kong. I would like to export this to KML and export it to Google Map for overlay.

After I converted it to KML in QGIS (just save as kml format) and opened it in Google Map, it seems the coordinate is out of the entire map world region. Is there any conversion I need to do from ESRI SHP coordinate system to Google Map compatible coordinate system?

Thank you for any pointer!

  • The final command I ran: ogr2ogr -s_srs EPSG:2326 -t_srs EPSG:4326 -f "KML" ~/output.kml ~/input.shp
    – Jimmy Chu
    Dec 3 '12 at 9:10

For such conversion I often use the free and opensource tool ogr2ogr

An easy to use command line. A cheatsheet with must common command from Boston GIS

It would be something like: ogr2ogr "KML" output_filename.kml input_filename.shp

With this tool you can also set the coordinate system.

  • 1
    KML only supports WGS 84 system Dec 3 '12 at 8:02

Yes off course you need to change the coordinate system. I think you are working with local projected coordinate system. Google KML support Global WGS84. Please convert your coordinate system to WGS84 and then try again to convert the ESRI shp file to KML. If you have access to ArcGIS data interoperability then you can easily convert also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.