[gdal-dev] Fwd: ogr2ogr. SQL seems to disable use_gpx_extensions

Pedro Machado Monteiro pedromachadomonteiro at gmail.com
Fri Sep 12 00:31:41 PDT 2014


Hello:



I’m trying to export a shapefile to a GPX file, with GDAL 1.9.0 ogr2ogr.



>From the shapefile attribute table, I want  to export some fields to  the
corresponding tags of the GPX file, and the remaining (or all) fields to
the <extensions> tag



That does’nt seem to work: when I use the *–sql* option SELECT AS (ex: to
export the field “Linha” from the shape attribute table, to the GPX
<name>), it seems that the *-dsco* option USE_GPX_EXTENSIONS=YES is
disabled, because the result always lacks the <extensions> tag, with the
remaining (or all) fields.


But http://gdal.org/drv_gpx.html says that If GPX_USE_EXTENSIONS=YES is
specified, extra fields will be written inside the*<extensions>* tag.



Here is the kind of statement:



*ogr2ogr* *-f* GPX *-dsco* GPX_USE_EXTENSIONS=YES exportfile.gpx sourcefile.shp
*-sql* *"*SELECT Linha AS name FROM sourcefile*"*



Thanks for any help

Pedro Monteiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140912/f8463f53/attachment-0001.html>


More information about the gdal-dev mailing list