[Gdal-dev] KML Write-only driver for OGR
Daniel Morissette
dmorissette at mapgears.com
Thu May 25 10:54:09 EDT 2006
Christopher Condit wrote:
> 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?
>
I think I'd go with #2 since my understanding is that there is no
guarantee on the way the attributes would be encoded in the Description
element, so we cannot implement any robust parsing of attributes inside
the KML reader. If users of the KML driver need access to the attributes
from a well-known source then they can always implement a script to
parse the attribute values themselves.
> Also, we'll lose formatting information from the KML - but I don't see
> any way around that...
>
I haven't looked at KML myself, but what type of formatting information
does it include? Could we store that in a style string?
Frank Warmerdam wrote:
>
> So, I'll start things out with a +1 in support of this new driver.
>
+1 from me.
> PS. I don't foresee needing a written RFC for non-disruptive changes
> such
> as adding a new driver.
>
Can I ask for at least a bug to document the addition of the driver, its
features and its limitations at the time of initial implementation?
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the Gdal-dev
mailing list