[Qgis-user] GPX data in QGIS.

Garth Fletcher garth at jacqcad.com
Thu Sep 10 19:25:54 PDT 2020


On 10 Sep 2020 at 20:12, J. M <jimimckay at gmail.com> wrote:
> I can successfully import .gpx files into QGIS, and they are visible and
> can be clustered in new groups (waypoints, tracks and routes appear as
> independent layers). The problem I'm having is that I can't seem to find
> any way to access the data about the routes (distance, time, etc) which is
> clearly visible in the app I used to create the tracks

The GPX file contains a number of fields whose contents you can see / 
access in the layer's Attribute Table
  right-click on layer and choose Open Attribute Table

However, these are only the extra fields in the GPX records but
NOT including the x,y coordinates (Long,Lat)

To access the later, use the Field Calculator
  select the layer
  click on Open Field Calculator icon (Abaccus) in the menu bar
     which is next to the Open Attribute Table icon in menu, or
   in Processing > GDAL > Vector Table > Field Calculator

create new fields, called Lat and Long, as decimal numbers
and enter the expression $X or $Y (see Geometry > for details)
When you click OK, the new fields will be appended and filled in
with the right values.

You can then access them in the layer's Attribute Table.

With those 2 extra fields you essentially have access to everything
that was recorded in the GPX file.

You can also use Field Calculator to add more fields and populate
them with calculation results.

As an aside, Field Calculator cannot create new fields in the GPX
file; instead it creates them as temporary virtual fields.

A better approach is to first save the data in a shape file
  right-click on layer, choose Export > Save selected features
then open that file instead of the original GPX.
Field Calculator will add new fields to that format.

Cordially,
-- 
Garth Fletcher


More information about the Qgis-user mailing list