#6409 closed enhancement (fixed)

libkml driver use document name as name of layer

Reported by: rashadkm Owned by: warmerdam
Priority: normal Milestone: 2.1.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: libkml
Cc:

Description

This question has been raised on gdal-dev list. As Even said, current gdal libkml driver reports layername if the name tag is under <Folder> tag. If no folder tag is present, it simply takes the name of file. I had modified libkml driver source to take Document's name tag if no folder tag is present. If <Document> does not have a name it will fall back to old behavior and use filename as layer name.

Following EvenR's advice, I had added a testcase for this in gdal's autotest code.

Attachments (2)

libkml_doc_name.patch (3.5 KB) - added by rashadkm 14 months ago.
emptylayers_without_folder.kml (247 bytes) - added by rashadkm 14 months ago.
autotest/ogr/data/emptylayers_without_folder.kml

Download all attachments as: .zip

Change History (3)

Changed 14 months ago by rashadkm

Attachment: libkml_doc_name.patch added

Changed 14 months ago by rashadkm

autotest/ogr/data/emptylayers_without_folder.kml

comment:1 Changed 14 months ago by Even Rouault

Component: defaultOGR_SF
Keywords: libkml added
Milestone: 2.1.0
Resolution: fixed
Status: newclosed

Thanks.

trunk r33686 "LIBKML: for documents without folder, use document name when available as name of layer (patch by Rashad Mohammed, #6409)"

Note: See TracTickets for help on using tickets.