I have no idea where to send this and after signing up for the another
list server, I thought I might try here. Let me first say that I have
been using the heck out of gdal, ogr2ogr, and postgis for a few days now to generate kml files with relative ease, using commands like:

ogr2ogr -f kml himom.kml PG:"host=localhost dbname=$1" -sql "select
st_transform(boundary,4326), blah, blah, blah from my table"

While this is awsome, I need to export a timestamp/timespan into the kml
file as well so I can make use of the time slider in google earth. I'm
a relative newbie to xml/kml and had no idea if ogr2ogr/postgis can do this. I'm pretty sure after some experimentation, that concatenating multiple files:

ogr2ogr -f kml himom.kml PG:"host=localhost dbname=$1" -sql "select
st_transform(boundary,4326), blah, blah, blah from my table where time = this_time"

ogr2ogr -update -append -f kml himom.kml PG:"host=localhost dbname=$1" -sql "select st_transform(boundary,4326), blah, blah, blah from my table where time = next_time"

seems to only produce a file with the last query. So my questions are these:

1) is it possible to include additional tags <TimeSpan><when>...</when></TimeSpan> as part of the sql query (e.g. next_time as TimeStamp),

2) Does anyone know if the -update -append works with -sql,

3) While I think I can hack a solution (read I must hack a solution), where is the documentation for adding features to ogr2ogr),

4) Would it be easier to post process the generated kml file(s) and manipulate the file/entries myself using another tool since I'm kind of new to xml/kml/gdal/etc.

Jeff D. Hamann, PhD
Forest Informatics


begin:vcard
fn:Jeff Hamann
n:Hamann;Jeff
org:Forest Informatics
adr:;;PO Box 1421;Corvallis;Oregon;97339-1421;United States
email;internet:[email protected]
title:President
tel;work:15417542457
x-mozilla-html:FALSE
url:www.forestinformatics.com
version:2.1
end:vcard

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to