[Gdal-dev] KML with descriptions from Postgis Views via ogr2ogr

Georges Moes g.moes at web.de
Sun Feb 1 20:09:37 EST 2009


I'm really impressed by the command-line functionality of ogr2ogr, since I've
found until now no suitable gui to use it under Windows.

Actually I try to create KML-files from Postgressql/Postgis-data with
ogr2ogr, which works fine. I encountered only two problems, that I couldn't
solve until now. Maybe there is someone that can help me.

My command looks like this:
ogr2ogr -f KML c:/parzellen.kml PG:"host=localhost port=5432 dbname=test
user=postgres password=XXXX" -sql "select ka_nr, ka_sect as Sektion, ka_flur
as Flur, ka_akte as Kaufakte, kart_dat as Kartierdatum, kart_pers as
Kartierer, pacht as Pächter, transform(the_geom,4326) from view_kataster"
-dsco NameField=kadaster_nr -dsco
DescriptionField=Sektion,Flur,Kaufakte,Kartierdatum,Kartierer,Pächter

My main problem is, that the kml-file is created, but doesn't display at the
right place in Google Earth. When opening the file in GE first GE zooms
close to the place, where the polygons should be. When I click in GE on the
imported layer, all the polygons are there, but they are displayed as point
marker??? When I click them, I get a balloon, with only a part of the
informations I wanted to be displayed. The main problem is, that the
balloons sit 'lost in space', meens outside the earth somewhere in space ??
When i hover the balloons with the mouse, the displayed lat and lon, and
hight values are OK.
I've tried to indicate the source and the target projection with -s_srs
"EPSG:2169" or -t_srs "EPSG:4326", but without other results.

The underlying table works fine, so maybe there is a problem with using
views in ogr2ogr??? 

The other problem is, that the kml-file only contains the NameField and the
3 first DescriptionFields (Sektion,Flur,Kaufakte), the rest is ignored. Are
there any restrictions I've ignored?

Maybe there is someone, who could give me an a tip or an answer to my
questions?


-- 
View this message in context: http://n2.nabble.com/KML-with-descriptions-from-Postgis-Views-via-ogr2ogr-tp2255911p2255911.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list