[gdal-dev] ingesting .gpx files from FFI

Even Rouault even.rouault at spatialys.com
Fri Oct 29 09:50:08 PDT 2021


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

Le 29/10/2021 à 18:32, Joaquim Manuel Freire Luís a écrit :
>
> 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 
> <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
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211029/c989f1c8/attachment.html>


More information about the gdal-dev mailing list