I already have found how to import GPX
files into PostgreSQL
using gdal/org2org
. Now I am wondering of dumping into GPX
files the results of my modification on dataset stored into PostgreSQL
. But I have not found how to do so. Provided I have kept the original structure of tables generated by ogr2org
, how can I dump their contents into a GPX
file?
Add a comment
|
1 Answer
General syntax would be something like this
ogr2ogr -f GPX output.gpx
PG:"host=myhost user=myloginname dbname=mydbname password=mypassword"
The GPX schema only allows certain field names. You can remap field names using the -sql option.
ogr2ogr -f GPX output.gpx
PG:"host=myhost user=myloginname dbname=mydbname password=mypassword"
-sql "SELECT field1 AS name, field2 AS desc FROM input"
more details here: http://www.gdal.org/drv_gpx.html
-
Just to add, GPX only allows EPSG:4326, and does not know polygons.– AndreJCommented Feb 14, 2016 at 7:21