[gdal-dev] KMZ Support in OGR?
Brian Hamlin
maplabs at light42.com
Mon Mar 31 14:50:13 EDT 2008
Hi Michael-
thanks for chiming in
two fundementals stand out for me about OGR and libkml
- OGR doesnt do styling much, and probably wont .. tons of KML is
styling related
corollary: when you read in KML, thats gone.. when you write out,
there is a lot missing from what people might typically expect
- the other is.. nested structures! just a collection of folders,
with stuff and other folders in them
OGR doesnt do this.. things are flat.. with a "layer" as a folder..
and any number of layers
thats it.. so a lot of the organization of a KML is gone
Chris Schmidt rightly pointed out that it would be immediately useful
is there was simply a way to get "all the Placemarks" from a KML. that
flat result, with just geometry, maps pretty much to what OGR really is
right now IMHO
best regards
-Brian
==
Brian Hamlin
ISDE5 Steering Committee
Planetwork.net
(415) 717-4462 (c)
On Mar 30, 2008, at 10:58 PM, Michael Ashbridge wrote:
> All,
>
> I'm one of the authors of libkml. I'm more than happy to answer any
> questions you have.
>
> To address some issues from the thread:
>
> - We chose the BSD license specifically to ensure maximum
> compatibility with as many other licenses as possible, and to allow
> maximum possible flexibility of use.
>
> - By itself zlib doesn't buy you zipfile/kmz support. We use the
> contributed minizip code. Our KMZ support right now is minimal. As
> Christopher hints, KMZ is more than just a zip-archive KML file. In
> the coming weeks and months, we'll flesh out (in code) precisely what
> "kmz support" really means.
>
> - Indeed, as it says in our documentation, v0.1 is not intended for
> use in production – although I would encourage everyone to experiment
> and comment.
>
> - Michael
>
> On Sat, Mar 29, 2008 at 8:53 PM, Christopher Condit <condit at sdsc.edu>
> wrote:
>>
>>
>>
>>
>> Here's the other problem I have with making KMZ's directly from OGR.
>> Often,
>> users will want to include auxiliary files for icons, etc in the kmz
>> archive. As soon as we start zipping KML output I'm worried we'll
>> have to
>> introduce some provision to include these files in the final output….
>>
>>
>>
>> -Chris
>>
>>
>>
>>
>>
>> From: Simon Perkins [mailto:sy at perkins.net]
>> Sent: Saturday, March 29, 2008 13:48
>> To: Christopher Condit
>> Cc: Brian Hamlin; gdal-dev at lists.osgeo.org
>>
>> Subject: Re: [gdal-dev] KMZ Support in OGR?
>>
>>
>>
>>
>> Well, all very salient points. I particularly liked the link to Joel
>> Spolsky's article. Should be required reading for all programmers!
>>
>> But a couple of comments anyway...
>>
>>
>> *) Google's libkml is not yet production ready
>>
>>
>>
>> Fair enough - I haven't used it. But my hope would be that if Google
>> is
>> going to be using this in Google Earth then it should get up to speed
>> pretty
>> darn quickly. Of course, I'm not sure they've said that...
>>
>>
>> *) Once the KML 2.2 spec is approved by OGC I expect it to be rather
>> stable, so I'm not sure that switching to libkml for an evolving
>> standard is really going to buy OGR much.
>>
>>
>>
>>
>> Another good point. To be honest my interest is more in seeing the
>> few
>> flaws I've discovered fixed than anything else. If it's easier to fix
>> the
>> current driver then that's probably the way to go.
>>
>>
>> *) It would probablybe trivial to add kmz support, but as Brian
>> suggested why not just pipe the file to a zip command?
>>
>>
>>
>>
>> Well, that's fine if you're just trying to lash something together
>> specifically for KML files on a linux system, but not so great if
>> you're
>> developing, say, commercial windows software that has to deal with
>> lots of
>> different formats. As I see it the whole point of an abstraction
>> layer like
>> GDAL/OGR is that you shouldn't have to care about the intricacies of
>> particular data formats. So if your users are going to be trying to
>> load KMZ
>> files (the Google Earth default format) into your application, it
>> would be
>> much nicer if OGR could just do its job and read those files without
>> you
>> having to special case things. No?
>>
>>
>> Sy
>>
>>
>>
>> -----Original Message-----
>> From: gdal-dev-bounces at lists.osgeo.org
>> [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Simon Perkins
>> Sent: Saturday, March 29, 2008 12:16
>> To: Brian Hamlin
>> Cc: gdal-dev at lists.osgeo.org
>> Subject: Re: [gdal-dev] KMZ Support in OGR?
>>
>> Brian Hamlin wrote:
>>
>>
>> <flame>You say you think it would be a great idea to add a new library
>>
>>
>>
>>
>> in place of most of the driver that is there, but dont have time
>> and/or ability to make a wiki page about that as a proposed
>> project?</flame>
>>
>>
>> Well, that at least is one thing I have the time to fix... I've added
>> an
>>
>> enhanced KML driver using the Google library to the GDAL SoC ideas
>> page.
>>
>> Feel free to edit!
>>
>> http://trac.osgeo.org/gdal/wiki/SummerOfCode
>>
>> Cheers,
>>
>> Simon
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list