[gdal-dev] [ogr2ogr] KML extendedData attribute

Even Rouault even.rouault at mines-paris.org
Wed Jul 20 10:47:08 EDT 2011


Jordi,

GDAL trunk, with LIBKML driver (the one which requires GDAL to be built 
against Google libkml library, to be opposed to the "old" hand-written KML 
driver), can recognize the ExtendedData of the first sample found in 
http://code.google.com/apis/kml/documentation/extendeddata.html

Extract of ogrinfo on that file :

Name: String (0.0)
description: String (0.0)
timestamp: DateTime (0.0)
begin: DateTime (0.0)
end: DateTime (0.0)
altitudeMode: String (0.0)
tessellate: Integer (0.0)
extrude: Integer (0.0)
visibility: Integer (0.0)
holeNumber: String (0.0)
holeYardage: String (0.0)
holePar: String (0.0)
OGRFeature(extendeddata):1
  Name (String) = Club house
  description (String) = (null)
  timestamp (DateTime) = (null)
  begin (DateTime) = (null)
  end (DateTime) = (null)
  altitudeMode (String) = (null)
  tessellate (Integer) = -1
  extrude (Integer) = -1
  visibility (Integer) = -1
  holeNumber (String) = 1
  holeYardage (String) = 234
  holePar (String) = 4
  POINT (-111.956 33.5043)

Note that the support of <ExtendedData> without <SchemaData> is specific to 
trunk version. (introduced in 
http://trac.osgeo.org/gdal/changeset/22127/trunk/gdal/ogr/ogrsf_frmts/libkml)

I've also just fixed an issue with the mapping of some data types when 
<SchemaData> is used. See http://trac.osgeo.org/gdal/ticket/4171

Best regards,

Even


More information about the gdal-dev mailing list