[gdal-dev] KMLSuperOverlay in Google Earth

Kyle Shannon KShannon at gcs-research.com
Fri Nov 18 14:04:13 EST 2011

I doubt they will change the spec, and I am sure you are right about the many bad files.  I imagine that most people just checked the output from his or her program in google earth and said "Good enough".  If no one gets around to it before I get off work and to a *nix workstation, I will file a ticket and a patch.  It is probably safe to backport to 1.8 as well.

From: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Roland Duhaime
Sent: Friday, November 18, 2011 9:59 AM
To: gdal-dev at lists.osgeo.org"
Subject: Re: [gdal-dev] KMLSuperOverlay in Google Earth


Yes, I just removed the spaces after the commas in the <coordinates> tag and was then able to open one of the kml files in G.E.  I suspect that there are m(b)illions? of kmz files in cyberspace that won't meet the 2.2 standard because of this.  I am not sure of the most effective solution.  In addition to documentation, perhaps we need a conversion tool for legacy 2.1 kml superoverlays.  Perhaps getting the 2.2 KML standard to lighten-up a tad would be complicated.

Thanks Again,

On Fri, Nov 18, 2011 at 11:14 AM, Kyle Shannon <KShannon at gcs-research.com<mailto:KShannon at gcs-research.com>> wrote:
Possible issue with output (from http://earth.google.com/support/bin/answer.py?answer=40901):

To conform more closely with the OGC KML 2.2 standard, we've made the parsing of the <coordinates> tag more strict in version 6.1. Spaces must only be used to separate the (longitude,latitude,altitude) triplets which specify the coordinates of a single point. It is invalid to add spaces between individual coordinates. We understand that previous versions of the client were more lenient, so if your KML files contain spaces beween coordinates in coordinate triplets, an easy workaround is to remove all whitespace located immediately before or after commas inside a <coordinates> tag.

I checked one file, and there were spaces after the commas:

<kml xmlns="http://earth.google.com/kml/2.1" xmlns:gx="http://www.google.com/kml/ext/2.2">
                <ListStyle id="hideChildren">
                           12.492253, 41.890160, 0
                           12.506078, 41.890461, 0
                           12.505676, 41.900791, 0
                           12.491848, 41.900490, 0

Seems like a quick fix.  Someone should probably file a ticket for documentation, I can do that if need be.


From: gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org> [mailto:gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org>] On Behalf Of Roland Duhaime
Sent: Friday, November 18, 2011 7:14 AM
To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] KMLSuperOverlay in Google Earth


The PNG gdalinfo details are:

Driver: PNG/Portable Network Graphics
Files: 7.png
Size is 218, 218
Coordinate System is `'
Image Structure Metadata:
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  218.0)
Upper Right (  218.0,    0.0)
Lower Right (  218.0,  218.0)
Center      (  109.0,  109.0)
Band 1 Block=218x1 Type=Byte, ColorInterp=Red
Band 2 Block=218x1 Type=Byte, ColorInterp=Green
Band 3 Block=218x1 Type=Byte, ColorInterp=Blue
Band 4 Block=218x1 Type=Byte, ColorInterp=Alpha


On Thu, Nov 17, 2011 at 5:21 PM, Roger André <randre at gmail.com<mailto:randre at gmail.com>> wrote:
What is the output of gdalinfo on one of the PNG's in the superoverlay?

On Thu, Nov 17, 2011 at 1:36 PM, Roland Duhaime <roland.duhaime at gmail.com<mailto:roland.duhaime at gmail.com>> wrote:

Has anyone else experienced the latest version of Google Earth ( or the G.E. API not loading PNG formatted KMLSUPEROVERLAYs created using gdal_translate?  The same KMZ files worked in the past.


gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and delete the original message.   ­­

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111118/16341c10/attachment-0001.html

More information about the gdal-dev mailing list