[gdal-dev] -f kml and -sql options for TimeStamp
Jeff Hamann
jeff.hamann at forestinformatics.com
Mon Feb 2 14:15:03 EST 2009
In the last hour I've managed to export KML files using the following
syntax after some simple mods (read mimic the name/description handling)
to the KML export functions in OGR:
/Library/Frameworks/GDAL.framework/Programs/ogr2ogr \
-f KML activity.kml \
PG:"host=localhost dbname=wadnr" \
-sql "select st_transform(st_centroid(boundary),4326), \
current_database() as name, \
now() as generated_when, \
effective_date || 'D' as TimeStamp \
from tmp_tbl limit 15000" \
-nlt POINT \
-nln activity
I'm not sure the best way to get this code back into the repos if anyone
is interested (and I haven't bothered to fix the following):
ogr2ogr(25854) malloc: *** error for object 0xf01350: incorrect checksum
for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
ogr2ogr(25854) malloc: *** error for object 0xf01360: incorrect checksum
for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
ogr2ogr(25854) malloc: *** error for object 0xf01370: incorrect checksum
for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Warning 1: Multi-column primary key in 'stems' detected but not supported.
jeff-hamanns-macbook-pro:trunk hamannj$
but it does the job of adding the following tags/elements/whatever
they're called to the file:
<TimeStamp><when>2002-05-18D</when></TimeStamp>
to each placemark, which is what I needed. I have a feeling I'll be
hacking on this again in the next few days, so any advice for putting in
other features would be helpful. Ultimately, I need to include both
TimeStamps and TimeSpans for each entry (Placemark/Linestring/Polygon).
Next stop, coloring the pins ;-)
Jeff.
-------------- 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/2710ea85/jeff_hamann.vcf
More information about the gdal-dev
mailing list