Opened 17 years ago

Closed 14 years ago

#1851 closed defect (fixed)

KML Driver - <Name> tag disappears

Reported by: darkblueB Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: kml
Cc:

Description

When converting from KML to another format, then back to KML, the <Name> tag for a Placemark is converted to a comment in formatted HTML CData. This is bad, because the name is used quite a bit in KML handling, and is fundemental to the KML file format.

The KML driver notices there is no Name tag on output and takes the trouble to mention it, indicating perhaps that others know of the importance of this tag.

The test here is for a Placemark name, however a <name> can occur in several other places in KML. Its worth looking at these cases.

Reproduce: convert the file Polygon.kml to an ESRI shape file. Convert the shp file back to KML

Attachments (1)

Polygon.kml (975 bytes ) - added by darkblueB 17 years ago.

Download all attachments as: .zip

Change History (5)

by darkblueB, 17 years ago

Attachment: Polygon.kml added

comment:1 by darkblueB, 17 years ago

In some cases, the <name> and <description> tags are used interchangeably, or jumbled. See bug #1858

comment:2 by Even Rouault, 17 years ago

Fixed in trunk in r12259.

The fix is to set pszNameField to a default value of 'Name' and add a pszDescriptionField attribute (creation option) that defaults to 'Description'. This way KML --> KML doesn't loose information.

comment:3 by Even Rouault, 17 years ago

In r12259 changeset description, I said that it fixes #1858 too. But in fact, not, #1858 is another issue

comment:4 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.