I have some waypoint layers that contain different types of points and I distinguish these in QGIS by different symbols and colours. I want to export these to a GPX file that I can download to my GPS but The GPX file contains just the lat, long and the 'type'.
Is there a way of getting gpstool to save other attributes in a gpx file?
I do get some more data out in (gid, source and classification) so I can write a script to process the xml and add the necessary attributes that the GPS expects.
Secondary question: Would this make a useful plugin?
Best Answer
Using pure GDAL, you can preserve the waypoint symbol and type of an original GPX file with
So if you have a shapefile in QGIS, create columns with names
sym
andtype
and export it to GPX format withGPX_USE_EXTENSIONS=YES
(which is default for GPX since QGIS 2.4).Remember to save into EPSG:4326, as GPX only allows that.
Other features (like
label
) will be exported in the<extensions>
element, and probably ignored by a GPS unit. My output reads as follows:The available symbols depend on the GPS units, so you might create a sample GPX file with the unit and test all available symbols. These will not be imported into QGIS, but you can read the file with a text editor.
As an example, symbols of the Garmin Oregon 6xx are listed at this site. You can even create your own symbols and upload them.