<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>You didn't explore completely the dataset. The waypoints layer
has 0 feature, but the tracks one has 1 and the track_points one
2469<br>
</p>
<div class="moz-cite-prefix">Le 29/10/2021 à 18:32, Joaquim Manuel
Freire Luís a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:AM6PR04MB39599E72F12C3FF7EEEF0B1FA6879@AM6PR04MB3959.eurprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Trying to read .gpx
files from Julia (and I would bet, from python too but can’t
test it) is showing puzzling results.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For example, with the
attached gpx file I get this<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia> ds =
gdalread("25708.gpx", gdataset=true);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia> layer =
getlayer(ds, 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Layer: waypoints (1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Geometry 0 (</span><span
style="font-family:"Tahoma",sans-serif"
lang="EN-US">�</span><span lang="EN-US">∟*</span><span
style="font-family:"Tahoma",sans-serif"
lang="EN-US">��</span><span lang="EN-US">): [1]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Field 0 (ele):
[Real]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Field 1 (time):
[9999]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Field 2 (magvar):
[Real]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Field 3
(geoidheigh): [Real]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Field 4 (name):
[String]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">...<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Number of Fields: 23<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But there are no
Features in the layers, so I can’t get the data from the
geometries<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia>
GMT.Gdal.nfeature(layer)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">HOWEVER, both the GDAL
`ogr2ogr` command line or it’s Julia wrapper works in
converting, e.g., to geopackage<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">julia>
ogr2ogr("25708.gpx", dest="25708.gpkg")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">and I can now plot
"25708.gpkg" (not shown here but the plot can be seen in
<a
href="https://discourse.julialang.org/t/what-is-your-favorite-mapping-package/70509/22?u=joa-quim"
moz-do-not-send="true">
https://discourse.julialang.org/t/what-is-your-favorite-mapping-package/70509/22?u=joa-quim</a>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How is ogr2ogr able to
read this file data?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Joaquim<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>