[Qgis-user] gps plugin

Micha Silver micha at arava.co.il
Sat May 30 01:23:25 PDT 2009


mtnbiketrail at zzz.com wrote:

> I used the gps plugin to load a gpx file, but it switches the lat and 
> long around and so won't match up with my raster geotiff. The mouse 
> pointer coords actually show -123, 41 instead of 41, -123.
> This came from a garmin Mapsource generated gpx file.
>
The problems of "axis order"[1] are a real bugger. I didn't know that 
Mapsource reversed the order.  Here's an idea how to reverse the order 
of the Mapsource gpx files to get the lat and long correct:

The proj4 utility cs2cs has a '-r' option to reverse x-y to y-x. But to 
use it, cs2cs expects a simple text list of coordinates (not the xml 
formatted gpx file). So you would first have to use gpsbabel to convert 
like so:
gpsbabel -i gpx -o csv <waypoints.gpx>  <waypoints.csv>
Now edit that new csv file to *remove* all the commas. Then you can run:
cs2cs -r +init=epsg:4326 +to +init=epsg:4326 waypoints.csv >> 
waypoints_fix.txt
And finally use gpsbabel again to revert this new waypoints_fix.txt back 
to gpx format.

It's pretty convoluted, but *might* work...

Regards,
-- 
Micha

[1] http://wiki.osgeo.org/wiki/Axis_Order_Confusion
> Any suggestions?
> thanks,
> Tom
>
> Using 1.0.0 on Ubuntu heron.
> I also tried it on 1.0.1 on Windows XP
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> This mail was received via Mail-SeCure System.
>
>




More information about the Qgis-user mailing list