ThinkGeo.com    |     Documentation    |     Premium Support

XY Coordinates reversed on some GPX layers

Hello again,

In putting together a utility to convert GPX layers to shapefiles I noticed some of the shapefiles I created were not showing up in the correct location, off by thousands of miles. I examined the coordinates in the shapefile and compared them with the raw GPX text and found that the XY coordinates were reversed in the GpxFeatureLayer. It happens when a line is created from a route (<rte>) in the GPX layer as follows:

<gpx xmlns=“http://www.topografix.com/GPX/1/1” version=“1.1” creator=“https://github.com/gps-touring/js-app-src”><rte>Alt_Portsmouth.gpx_0</name>
<desc><![CDATA[<h2>Track information:</h2>
<p>Name: 127 A27 - 21 Wharf Rd</p>
]]></desc>
<rtept lat=“50.87551” lon="-1.28259"><name>0.00km</name>
<sym>warningflag</sym>
<cmt>0.00km
</cmt>
</rtept>

I have attached the full GPX file so you can have a look.

Thanks!

Steve
Alt_Portsmouth.gpx_0.gpx.zip (2.1 KB)

Hey @Steven1,

We did indeed find that the X & Y were swapped but luckily only for RTEPT routes, the others were fine. We committed that and it should be available in the beta builds later today in a few hours. While we are there we will check out the other issue.

Thanks,
Kyle