Ticket #2316 (new enhancement)

Opened 3 months ago

Patch to use libkml for OGR KML reader

Reported by: rouault Assigned to: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: kml libkml
Cc: darkblueB, condit, sperkins

Description

I wanted to test a bit libkml... so here's a patch to current GDAL SVN trunk that uses it for KML reading. I've imported libkml (latest libkml SVN) into ogr/ogrsf_frmts/kml/libkml and minizip into ogr/ogrsf_frmts/kml/minizip. The old Expat reading code is still there. The new libkml-based code is activated by HAVE_LIBKML which is default in the GNUmakefile now.

As I've only modified the GNUmakefile, libkml will only be used on UNIX platforms.

ogr_kml.py is now failing as I've changed the way of naming layers, so that should be fixed.

Libkml is pretty easy to use (the whole reader code fits into ~ 250 lines of code) and it brings easily the capability of reading multigeometry now, as well as KMZ.

There are issues that would need to be solved, such as how to handle properly nested content (I've introduced the convention 'layer0layer1layer2' if layer2 is nested into layer1 which is nested into layer0).

It's also arguable whether we should import libkml and minizip source code into GDAL tree or not.

I will not be able to improve that work for the following 5 weeks, so if people want to go on, they're greatly welcome.

Attachments

ogr_kml_with_libkml.patch.gz (137.3 kB) - added by rouault on 04/06/08 13:47:59.

Change History

04/06/08 13:47:59 changed by rouault

  • attachment ogr_kml_with_libkml.patch.gz added.