[gdal-dev] KML output fields
condit at sdsc.edu
Fri Sep 26 19:21:09 EDT 2008
The KML driver should behave as follows:
If you define a field using a creation option for NameField (the default
is "Name") then it will be written out as the "Name" element. Likewise
with "Description". You're saying that everything works fine using
ogr2ogr but when you try to create an OGR dataset programmatically you
get extra, empty "name" and "description" elements in the output? Can
you file a trouble ticket and include your input layer and code snippet
From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Clay, Bruce
Sent: Friday, September 26, 2008 10:53 AM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] KML output fields
When I use ogr2ogr to convert a shapefile to KML there are no "Name" or
"Description" fields in the output and all attributes are lined up.
When I try to create a KML file from my code and populate the data both
"Name" and "Description" fields are included in the output.
I have tried not a variety of things in the call to KML's
Not setting any options (i.e. passing a NULL)
Setting both to empty strings
CSLSetNameValue( ogrOptions, "NameField", "");
CSLSetNameValue( ogrOptions, "DescriptionField", "");
Setting both to "None"
CSLSetNameValue( ogrOptions, "NameField", "None");
CSLSetNameValue( ogrOptions, "DescriptionField", "None");
None of the above will remove the 2 fields from the output KML as a
result all real attribute values are sifted up 2 places.
I looked in the ogr2ogr.cpp and I do not see any parameters getting
passed into the call.
Does anyone have any idea what might be causing this?
This message and any enclosures are intended only for the addressee.
notify the sender by email if you are not the intended recipient. If
not the intended recipient, you may not use, copy, disclose, or
message or its contents or enclosures to any other person and any such
may be unlawful. Ball reserves the right to monitor and review all
and enclosures sent to or from this email address.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev