Subscribe to this thread
Home - General / All posts - Handling GPX Extensions
joebocop
348 post(s)
#07-Nov-18 17:38

I have been given some GPX files having these first two lines:

<?xml version="1.0"?>

<gpx version="1.1" creator="GDAL 2.2.4" 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">

Point features within these GPX files are described as

<wpt lat="54.1" lon="-60.1">

  <extensions>

    <ogr:id>11.0</ogr:id>

    <ogr:WP>QB_11</ogr:WP>

  </extensions>

</wpt>

Release 9 successfully imports the geometry, but the data table fields are otherwise all null owing, I presume, to the lack of support for gpx "extensions".

It would be handy if Release 9 could

  • create a field in the new table component on import for each of the unique fields defined within a GPX file's <extensions>
  • automatically add mfd_id field and mfd_id_x btree index on tables created by the GPX import process

Now that I've written all this, it's probably more appropriate to be sent in as a suggestion, but I can hardly bare the thought of trashing the post now.

joebocop
348 post(s)
#08-Nov-18 00:53

To be clear, the GDAL dataport adds columns for the extensions, it's just not as easy to mass-import-and-merge hundreds of GPX files using "Data Source" rather than "import"

adamw


8,204 post(s)
#08-Nov-18 14:16

Thanks for the post. Be sure to send it in as a suggestion.

You can mass-import using GDAL, just in case. File - Import, set file filter to GDAL ('. Files (GDAL/OGR)'), then select multiple files and click Import.

joebocop
348 post(s)
#08-Nov-18 18:37

Deadly, thank you!

The GDAL import doesn't retain the file name in the component names, however, so we lose that bit of metadata, and the hundreds of layers can't then be merged.

I'll synthesize all of this into another suggestion. Thanks.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.