<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><p>Hello:<br></p></div><div class="gmail_quote"><div dir="ltr">
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to
export a shapefile to a GPX file, with GDAL 1.9.0 ogr2ogr. </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">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</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">That does’nt
seem to work: when I use the <b>–sql</b> option
SELECT AS (ex: to export the field “Linha” from the shape attribute table, to
the GPX <name>), it seems that the <b>-dsco</b>
option USE_GPX_EXTENSIONS=YES is disabled, because the result always lacks the <extensions>
tag, with the remaining </span>(or all) fields.</p><p class="MsoNormal"><span lang="EN-US"><br></span></p><p class="MsoNormal"><span lang="EN-US">But <a href="http://gdal.org/drv_gpx.html" target="_blank">http://gdal.org/drv_gpx.html</a> says that </span><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">If GPX_USE_EXTENSIONS=YES is specified, extra fields will be written inside the</span><i style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><extensions></i><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"> tag.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Here is the
kind of statement:</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-family:'Courier New';color:black">ogr2ogr</span></b><span lang="EN-US" style="font-family:'Courier New';color:black">
<b>-f</b> GPX <b>-dsco</b> GPX_USE_EXTENSIONS=YES exportfile.gpx </span><span lang="EN-US" style="font-family:'Courier New';color:black">sourcefile.</span><span lang="EN-US" style="font-family:'Courier New';color:black">shp <b>-sql</b> <b>"</b>SELECT </span><span lang="EN-US" style="font-family:'Courier New';color:rgb(0,176,80)">Linha</span><span lang="EN-US" style="font-family:'Courier New';color:black"> AS </span><span lang="EN-US" style="font-family:'Courier New';color:red">name</span><span lang="EN-US" style="font-family:'Courier New';color:black">
FROM </span><span lang="EN-US" style="font-family:'Courier New';color:black">sourcefile</span><b><span lang="EN-US" style="font-family:'Courier New';color:black">"</span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-family:'Courier New';color:black"> </span></b></p>
<p class="MsoNormal" style="text-align:justify"><span lang="EN-US">Thanks for any help</span><span class=""><font color="#888888"><b><span lang="EN-US" style="font-size:12pt;color:rgb(79,98,40)"></span></b></font></span></p><span class=""><font color="#888888"><div><p><span style="font-size:11pt;color:rgb(31,73,125)">Pedro Monteiro</span></p></div></font></span></div></div></div>
</div><br></div>