[gdal-dev] ingesting .gpx files from FFI
Joaquim Manuel Freire Luís
jluis at ualg.pt
Fri Oct 29 09:32:01 PDT 2021
Hi,
Trying to read .gpx files from Julia (and I would bet, from python too but can’t test it) is showing puzzling results.
For example, with the attached gpx file I get this
julia> ds = gdalread("25708.gpx", gdataset=true);
julia> layer = getlayer(ds, 0)
Layer: waypoints (1)
Geometry 0 (�∟*��): [1]
Field 0 (ele): [Real]
Field 1 (time): [9999]
Field 2 (magvar): [Real]
Field 3 (geoidheigh): [Real]
Field 4 (name): [String]
...
Number of Fields: 23
But there are no Features in the layers, so I can’t get the data from the geometries
julia> GMT.Gdal.nfeature(layer)
0
HOWEVER, both the GDAL `ogr2ogr` command line or it’s Julia wrapper works in converting, e.g., to geopackage
julia> ogr2ogr("25708.gpx", dest="25708.gpkg")
and I can now plot "25708.gpkg" (not shown here but the plot can be seen in https://discourse.julialang.org/t/what-is-your-favorite-mapping-package/70509/22?u=joa-quim)
How is ogr2ogr able to read this file data?
Thanks
Joaquim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211029/a06f979f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 25708.gpx.zip
Type: application/x-zip-compressed
Size: 22325 bytes
Desc: 25708.gpx.zip
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211029/a06f979f/attachment-0001.bin>
More information about the gdal-dev
mailing list