Is it possible to convert a shapefile to a kml-file, that I can use for a bing map web application? I’ve tried the programm Shp2kml, but when I use the coordinates I see nothing.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
KML files are only capable of representing coordinates expressed in the WGS84 coordinate system – i.e. a latitude between -90 and +90, and a longitude value between -180 and +180. From your comments above it seems that your shapefile is not currently measured in WGS84. It may be, for instance, in a US state plane coordinate system, the National Grid of Great Britain, or a UTM zone instead.
To find out which coordinate system it is using, you should find a .PRJ file that accompanies your shapefile. It’s a small text file that will give you the details of the coordinate system, datum, prime meridian etc. This will give you the information needed to convert to WGS84.
Rather than use shp2kml, you may want to investigate OGR2OGR (http://www.gdal.org/ogr2ogr.html) which is capable of both converting a shapefile to a KML file and also transforming the coordinate system in the process. It can also convert between lots of other spatial formats and databases.