QGIS import and export GPX

import is simple – just open the gpx-file with double click in the qgis-browser

export (lines)

  • right-click on the layer
  • save as…
    • Format: GPS eXchange Format [GPX]
    • Save as …
    • CRS: Selected CRS (coordinate reference system)
    • (do not „Add saved file to map“)
    • OK

export (points)

if you want to export points to GPX and get the following error – welcome 🙂

Export to vector file failed.
Error: creation of layer failed (OGR error:Geometry type of `Multi Point' not supported in GPX.)

i found this bug-fix and my workaround is to use the following script from the toolbox (menu Processing – Toolbox (on the bottom „Advanced Interface“))

  • GDAL/OGR – OGR Conversion – Conversion format

i added these additional commands to „creation options“:

GPX_USE_EXTENSIONS=YES -explodecollections
processing.runalg("gdalogr:convertformat","/Users/me/QGIS/test.shp",16,"-dsco GPX_USE_EXTENSIONS=YES -explodecollections","/Users/me/QGIS/test.gpx")

export the gpx file as a script via python run the following in your python-console

import processing
processing.runalg("gdalogr:convertformat","/Users/me/QGIS/test.shp",16,"-dsco GPX_USE_EXTENSIONS=YES -explodecollections","/Users/me/QGIS/test.gpx")



Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:


Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )


Verbinde mit %s