some *.gpx files fail to import
Some, or lets say most *.gpx tracks fail to import. when selected they throw error:
Parsing file has failed. The
format is not supported ог data
are corrupted.
however, there is a simple workaround:
Open the *.gpx file in any text editor and replace the header:
e.g. this unsupported header:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx
version="1.0"
creator="laavu.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
with one osmin accepts:
<?xml version="1.0"?>
<gpx version="1.1" creator="GDAL 2.2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogr="http://osgeo.org/gdal" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
and you are ready to use it in osmin.
osmin Version: 1.12.2 alpine/postmarketOS
The required version of the GPX file should 1.1 with namespace "http://www.topografix.com/GPX/1/1". The required version for Garmin extension is v3, with namespace "http://www.garmin.com/xmlschemas/GpxExtensions/v3". Those requirements are validated at https://github.com/Framstag/libosmscout/blob/e6585b8fc0e817cb375edc96d1f46519b63366e2/libosmscout-gpx/src/osmscoutgpx/Import.cpp#L282 . We could extend the supported versions, but old versions are no longer used from a decade.
I created a PR to allow importing v1.0. See https://github.com/Framstag/libosmscout/pull/1587 .
The release 1.12.4 includes the patch.
thanks!
i hope this will also change other things. i having such a hard time importing gpx files, even newly created ones like this do throw an import error:
just compiled osmin 1.13.0 and i can import the .gpx files.
🙏 Thank you so much for fixing this! 🙏