[gdal-dev] Shapefile OGR question/concern

Brian Hamlin maplabs at light42.com
Fri Mar 14 02:53:48 EDT 2008


On Mar 12, 2008, at 3:22 PM, Nikos Alexandris wrote:
>
> On Wed, 2008-03-12 at 18:03 -0400, Christiaan Janssen wrote:
>> I understand the need for the first and last point but what I don't
>> understand is why it is not handled appropriately (in my opinion) per
>> format. If KML only wants 4 points for a rectangle and other formats
>> want 5 (first and last point the same) why doesn't the import/export
>> function build the shape to an internal standard (ie have everything
>> load in with the first point repeated at the end). I tried importing a
>> shapefile into an OGRDataset and then exported it out to KML only to
>> have Google Earth hang on the resultant KML file. This obviosuly
>> implies that I would have to implement vector format specific
>> implementations, is there a reason for this?
>>
>> Christiaan
>
> I'd also like to hear more about it. A good place to start reading/
> searching would is probably http://www.gdal.org/ogr/drv_kml.html
>

I just wrote a trivial script to create geometry from WKT and export to 
KML (thanks FrankW)
both 4 point and 5 point Placemarks work fine in my Google Earth. The 4 
point one is just an open sided rectangle.

(I am sure drv_kml.html  doesnt say much about this case.. Additions 
welcome :-)

perhaps there is more going on in the one you are making from 
Shapefile, Christiaan
I'd be interested to look at it..
by coincidence there is a Maps hack event at UC Berkeley tomorrow and 
two Google KML tech support people will be there, as I will be

all for now
   -Brian

==
Brian Hamlin
ISDE5 Steering Committee
Planetwork.net
(415) 717-4462 (c)



More information about the gdal-dev mailing list