Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5068 closed defect (fixed)

GoogleEarth wont read KML files created by ogr2ogr: Unknown element <Schema>

Reported by: Nikos Alexandris Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: OGR_SF Version: unspecified
Severity: normal Keywords: ogr2ogr, kml, schema
Cc:

Description

Any attempt to create/convert a kml file (from a shapefile) using ogr2ogr, e.g.

ogr2ogr -f 'KML' SomePoint_from_OGR.kml SomePoint.shp

results in a .kml file that Google-Earth, both version 6 (from the Ubuntu 12.10 repositories) and 7 (the "official" 64-bit deb package), wont read with the "excuse": Unknown element <Schema>. Moreover, the example over at <https://developers.google.com/kml/articles/vector> is rejected by GE with the same error message.

It is noteworthy that, removing the <Schema> instructions altogether, makes the OGR-produced kml files readable.

An example that works fine is to be found at <https://developers.google.com/kml/documentation/extendeddata> (look for the "Example" under "Adding Typed Data to a Feature").

Attached a simple point created in GE (working), exported as kml, converted to ESRI Shapefile successfully using ogr2ogr and converted back to kml (non-working).

Attachments (3)

ClimbingSector_from_GE.kml (1.7 KB ) - added by Nikos Alexandris 11 years ago.
Some point created in GE
ClimbingSector_from_OGR_non-working.kml (828 bytes ) - added by Nikos Alexandris 11 years ago.
Some KML point converted from an OGR-based SHP wich was derived from a GE KML point
ClimbingSector_from_OGR_removed_Schema_working.kml (571 bytes ) - added by Nikos Alexandris 11 years ago.
Working KML file created using OGR by manually removing the Schema element

Download all attachments as: .zip

Change History (5)

by Nikos Alexandris, 11 years ago

Attachment: ClimbingSector_from_GE.kml added

Some point created in GE

by Nikos Alexandris, 11 years ago

Some KML point converted from an OGR-based SHP wich was derived from a GE KML point

by Nikos Alexandris, 11 years ago

Working KML file created using OGR by manually removing the Schema element

comment:1 by Even Rouault, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r25978) and in branches/1.10 (r25979)

comment:2 by Nikos Alexandris, 11 years ago

Tested with GDAL 1.10.0, released 2013/04/13: Works! Thank you.

Note: See TracTickets for help on using tickets.