[Qgis-user] Do GPX files contain CRS information?

Nicolas Cadieux njacadieux.gitlab at gmail.com
Fri Mar 5 08:37:45 PST 2021


Hi,
See comments below. Comments welcomed.

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 5 mars 2021 à 08:43, Greg Troxel <gdt at lexort.com> a écrit :
> 
> Nyall Dawson <nyall.dawson at gmail.com> writes:
> 
>> On Fri, 5 Mar 2021 at 14:59, jeremy benwell <jeremybenwell at gmail.com> wrote:
>>> I was wondering if GPX files contain CRS information? I saved some
>>> waypoints in my garmin gps and then used GPSBabel to upload those
>>> waypoints to my computer and create a GPX file. The map datum on my
>>> gps was set to GDA 94. Does my GPX file contain the CRS that my GPS
>>> was set to when I saved the waypoints (i.e. GDA 94) and if so do I
>>> need to make sure my QGIS project CRS is set to GDA 94 also?
> 
> The format spec is available:
>  https://www.topografix.com/gpx.asp
>  https://www.topografix.com/GPX/1/1/
> 
> The spec is clear that the datum is WGS84.
> 
> For elevation, I read the spec as saying that the datum is "WGS84
> orthometric height", meaning that one takes WGS84 ellipsoidal height and
> uses EGM2008 to get a height that is sort of "above sea level".  The
> notion that the height is ellipsoidal height is to me unreasonable.  

If the standard says orthometric height, it means that it takes the ellipsoïdal height and then applies the geiod model (in this case EGM2008 or Earth gravitational model 2008).  This is the height where the average sea level would be given the local gravity on land.  Orthometric height is the geiod height or the height above the average sea level.  

> I
> have observe garmin units using the "orthometric height" notion; my
> geoid separation is around -30m and this can be checked.  I have an open
> question to the GPX spec group about this.
> 
This is a typical difference between a geiod height and the ellipsoid.  The early geiod model like EGM96 had a 15 sec grid so that explained why a GPS had typically more error horizontally (z) than vertically (x,y) when compared to a good topographic map, at least in earlier devices that had rough geiod models. 

>> No, they don't store CRS. Definitely make sure you set the crs to
>> GDA94 (but only when the gps was explicitly set to this datum!!). I'd
>> suggest re-saving the gpx to a format like gpkg which can store the
>> gda94 crs correctly, so that the dataset will open in future with the
>> correct CRS and you won't run into issues later.
>> (GPX files are just text files -- you can open to verify this!)
> 
> I am pretty sure that Garmin units use the configured datum only for
> display, and that storage (which is actually GPX, in non-ancient units))
> and GPX is still in WGS84.  If not, they are IMHO buggy.  But I haven't
> set a datum in mine since I used NAD27 when displaying in UTM to find
> points with a ruler on older topo maps!

I think that was the case with my old etrex. 
> 
> 
> I would suggest to the Jeremy to understand the delta from "WGS84" to
> GDA94.  I'm not a geodesy.expert.au, but my impresssion is that it's
> only a few meters and that it is therefore unlikely that points from a
> Garmin unit have errors that are small enough to notice that.  I have
> not been able to notice the NAD83(2011)/WGS84(G1762) shift (about a
> meter) with L1-only navigation solution GPS.  I can resolve it very
> clearly with dual-frequency multi-constellation RTK.

In North American, most devices do not make a difference between Nad83 (revised models) and WGS84 (revised models).  I imagine this is probably the case with GDA94, specially if GDA94 was identical to WGS84 original in the beginning  (i’am not sure this is the case, I really don’t know here).
> 
> 
> Also, Jeremy should be aware of the "null transform" issue with WGS84.
> WGS84 will be considered equivalent to a number of datums.  For me, it
> is mapped without a shift to NAD83 and also to ITRF2014.   So if I
> display data that's actually in ITRF2014 and also data labeled WGS84,
> and change my project CRS from ITRF2014 to NAD83(2011), the relative
> position of points change.
> 
> Despite "GPX is WGS84", if the GPS receiver was receiving differential
> corrections, either locally or via SBAS such as WAAS, then the output
> coordinates are no longer in WGS84 and are instead in the differential
> system's frame.  WAAS is I believe in something like ITRF2005, but it's
> very hard to figure that out precisely.  (My understanding is that at
> least most of Australia currently has no available SBAS, but almost all
> measurements made in the US with navigation-grade equipment are with
> WAAS.)

Weird... I would expect the coordinates to be a simple corrections of whatever version of WGS84 is currently in use...  

> 
> The best approach is to stop using WGS84 as a CRS, and label the data
> with a more precise CRS.    Even for L1-only GPS with no corrections,
> today you get WGS84(G1762), which should not be subject to the "null
> transform" problem.    This is what Nyall suggested, far more concisely
> then I did :-)
> 
> Greg
> 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210305/efe4fec5/attachment.html>


More information about the Qgis-user mailing list