Opened 14 years ago

Closed 14 years ago

#2660 closed defect (invalid)

KML Driver Description problems

Reported by: condit Owned by: condit
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc: bclay@…

Description

I am using OGR to create both a shapefile and a KML file. The data in the shapefile looks good and the values in the KML are the same as in the shapefile but they are shifted up by 2 places. There are 2 extra attributes in the KML file (Name and Description). My “Longitude” value appears in the “Description” field.

I tried to use CSLSetNameValue( ogrOptions, "DescriptionField", "None"); to eliminate the Description field but it did not work.

Is there any way to eliminate the Name and Description fields since I don’t have any values to set for them?

Change History (5)

comment:1 by condit, 14 years ago

Owner: changed from condit@… to condit

comment:2 by condit, 14 years ago

Cc: bclay@… added

comment:3 by condit, 14 years ago

Per Bruce's email:

I was doing some more testing and found a place where I added the name field apparently to keep Google Earth from displaying the Latitude. It looks like if there is not Name field then Google displays the first attribute it sees in the KML feature.

When I do the KML output I basically copy attributes (I call outputLayer->CreateFeature( srcFeature ) from a shapefile layer to the KML layer but there is an extra field in the kml file.

Ogr2ogr gives the correct output without the extra fields so I need to see how that suppresses the extra fields.

Any thoughts would be greatly appreciated but I don't think it is in the shapefile or its driver. It probably is not in the KML driver either just something in the way I am calling it.

comment:4 by Even Rouault, 14 years ago

My email:

Bruce,

I think what you see is due to an inappropriate use of OGR API rather than a 
bug in OGR itself. I'd encourage you to browse that ticket 
http://trac.osgeo.org/gdal/ticket/2653 which is about GPX, but I think you're 
hitting the same scenario with KML as output.

comment:5 by Even Rouault, 14 years ago

Resolution: invalid
Status: newclosed

Closing as invalid. Reopen if not.

Note: See TracTickets for help on using tickets.