[gdal-dev] Regarding Attribute corruption while reading KML file

Abhinav abhinav at vizexperts.com
Mon Oct 1 13:37:48 PDT 2012


I am having Issue in reading attributes of kml file with Gdal.
When I am running gdalinfo in windows, it displays

Had to open data source read-only.
INFO: Open of `D:\Users\DMS\Desktop\Airbase.kml'
      using driver `KML' successful.
1: AIR_FIELD (3D Point)

Is it the right driver for the windows?

Attached with this is the file I am trying to read.

Thanks and regards
Abhinav Goyal


-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: Tuesday, October 02, 2012 1:05 AM
To: gdal-dev at lists.osgeo.org
Cc: Abhinav
Subject: Re: [gdal-dev] Regarding Attribute corruption while reading KML file

Le lundi 01 octobre 2012 21:24:49, Abhinav a écrit :
> I am facing problem in reading KML/GML file from GDAL. When I read 
> attributes values are not coming properly. All the values are present 
> in the respective file.
> 
> Is it the problem with the gdal driver or what?

With such an imprecise description (i.e no sample data file provided), it is difficult to know...

For KML, you need to have GDAL compiled with the LIBKML driver (not the base KML driver). Check the first lines of the output of "ogrinfo XXXXXX.kml". It must report:

INFO: Open of 'XXXXXX.kml'
      using driver `LIBKML' successful.

For GML, this should work for most cases, but there might be caveats depending of your data file.

Best regards,

Even
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Airbase.kml
Type: application/octet-stream
Size: 5481 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121002/8d4887f5/attachment.obj>


More information about the gdal-dev mailing list