[gdal-dev] -update -append -f kml and -sql options for time series?
Jeff Hamann
jeff.hamann at forestinformatics.com
Mon Feb 2 11:52:28 EST 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jeff_hamann.vcf
Type: text/x-vcard
Size: 284 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090202/82fb4c79/jeff_hamann.vcf
More information about the gdal-dev
mailing list