Opened 6 years ago

Closed 6 years ago

#7221 closed defect (fixed)

LIBKML : missing objects when using <Folder> tag

Reported by: bugbuster Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.1.2
Severity: normal Keywords: kml libkml
Cc:

Description

Dear all,

I am exporting KML vectors from our own application and try dump its content with orginfo. Below is a "special case" which is not correctly handled by GDAL :

  • some vector objects belong to the "Top Level"
  • some vector objects belong to a subfolder (KML tag : <Folder>)

I noticed that ogrinfo is missing the "top unnamed folder" with the up-to-date GDAL distribution.

With an older GDAL V1.11.2 (part of QGIS 2.8), I get both the subfolder content AND the top level one :

ogrinfo  snafu.kml
Had to open data source read-only.
INFO: Open of `snafu.kml'
      using driver `KML' successful.
1: SubFolder1 (3D Line String)
2: TopLevel (3D Line String)

With GDAL V2.1.2 (part of QGIS 2.18), I only get the subfolder content :

ogrinfo snafu.kml
INFO: Open of `snafu.kml'
      using driver `LIBKML' successful.
1: SubFolder1

As a result, the KML file is not correctly displayed in QGIS.

I get the same incomplete information with GDAL V2.2.1 I have compiled

I believe this is due to the new 'LIBKML' driver, since I managed to get everything fine when I skip it (--config GDAL_SKIP LIBKML).

Attached is a KML example.

Attachments (1)

snafu.kml (863 bytes ) - added by bugbuster 6 years ago.

Download all attachments as: .zip

Change History (2)

by bugbuster, 6 years ago

Attachment: snafu.kml added

comment:1 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 41370:

LIBKML: fix reading placemarks in toplevel container, when it has subfolders (fixes #7221)

Note: See TracTickets for help on using tickets.