[Gdal-dev] KML Write-only driver for OGR

Christopher Condit condit at sdsc.edu
Wed May 24 18:35:11 EDT 2006


It's certainly possible to add read support for KML.  The XML
construction is very similar to GML (at least for geometries).  The only
problem is that I'm not clear how to handle feature attributes, as KML
stores this type of thing in the "Description" element.  This content
model for this element is arbitrary text (which can also be HTML).  We
can:
0) Accept write only support for now
1) Define some convention for OGR <-> KML feature attributes that gets
stored in this description element
2) Allow only two attributes on read: name and description (populating
with content from these XML elements)
3) Other suggestions?

Also, we'll lose formatting information from the KML - but I don't see
any way around that...

-Chris


-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Frank
Warmerdam
Sent: Wednesday, May 24, 2006 2:48 PM
To: gdal-dev
Subject: [Gdal-dev] KML Write-only driver for OGR

Folks,

Christopher Condit wrote:
 > Hi Frank-
 >
 > I know this is unsolicited, but I added this for my own use and I
know
 > there's been some discussion on the mailing list about KML.  If it's
 > useful to the community and you're interested in adding it to OGR,
 > please do.
 >
 > I'm attaching the source (and modifications to main files) for an OGR
 > driver that outputs KML.  Since KML is so close to GML, I just
modified
 > the GML driver and removed read support since it doesn't make much
sense
 > to read a KML file.  The source could probably be cleaner since I
don't
 > really know OGR at all.  But it works well for writing and does not
 > require Xerces.
 >
 > I'd be happy to put in time to support this driver.
 >
 > Thanks for all your hard work on GDAL - it's a great tool!
 >
 > -Chris

It occurs to me that I shouldn't really be making the decision to
incorporate this on my own.  So I'm calling for a vote on this
inclusion.

As I see it the downside is that this driver is write-only, which isn't
a concept that is particularly well handled by OGR (there is not way for
a driver to indicate it is write only currently).   However, we have
done
this for GML, and DWG/DXF in the past so it isn't a new thing.

Beyond that I (well actually Mateusz on my behalf) and Christopher would
be responsible for supporting the driver.  Furthermore, we would
incorporate
a simple test script into the gdalautotest for it.

So, I'll start things out with a +1 in support of this new driver.

PS. I don't foresee needing a written RFC for non-disruptive changes
such
as adding a new driver.

Best regards,
-- 
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF,
http://osgeo.org

_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list