[gdal-dev] ogr2ogr: problems converting from shapefile to kml

Vishal Mehta vishal.mehta at sei-us.org
Wed Apr 6 19:34:39 EDT 2011


Thanks Even,
I was trying to overlay the kml on top of my crowdmap which uses OpenStreetMaps (which is in EPSG 900913 or 3857) as baselayer. When my kml did not appear, I thought I had to reproject it to the projection of the baselayer..

Looks like the problem lies elsewhere - maybe the ogr2ogr-output kml is missing a scale or size tag for the points...or something like that

best,
Vishal
 
-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Wednesday, April 06, 2011 4:02 PM
To: gdal-dev at lists.osgeo.org
Cc: Vishal Mehta
Subject: Re: [gdal-dev] ogr2ogr: problems converting from shapefile to kml

Le jeudi 07 avril 2011 00:39:59, Vishal Mehta a écrit :
> Hi all,
> 
> I'm having some trouble with a simple conversion from shapefile to kml.
> Description
> 1. I need to have a points file in kml that is is EPSG 3857 (the mercator
> that Google uses)

I'm afraid that you are loosing your time. KML coordinates must be expressed 
in EPSG:4326 per the spec.

See http://code.google.com/intl/fr/apis/kml/documentation/kmlreference.html 
and specifically :

"""<Location>
    Specifies the exact coordinates of the Model's origin in latitude, 
longitude, and altitude. Latitude and longitude measurements are standard lat-
lon projection with WGS84 datum. """

This is also reminded in the OGR KML doc : see 
http://gdal.org/ogr/drv_kml.html


More information about the gdal-dev mailing list