Re: [Gpsbabel-misc] Garmin lat/lon co-ords to UTM?
GPSBabel converts and transfers data like waypoints, tracks & routes.
Brought to you by:
robertl
|
From: Peter D. <p....@uq...> - 2007-05-03 08:49:32
|
Jean-Paul Thuot wrote: > Hello all, > > I have a Garmin Legend, and I'd like to download waypoints into a UTM > format. Is this possible with GPSBabel, or does anyone know of a > batch converter that I could use? > > Thank you in advance, > > I've done this using the program proj from http://www.remotesensing.org/proj/ like so gpsbabel -i garmin -f com1 -o xcsv,style=pta.style -F - | proj -r +proj=utm +datum=WGS84 +zone=56 +south where pta.style outputs lat lon alt description separated by whitespace The output from the pipeline will be east north alt description (proj passes through unchanged the rest of the fields beyond the first two) You can probably install proj from your package manager on linux. As an example of the power of connecting proj to gpsbabel, I wanted to upload the coordinates of some points that I have on Australian Map Grid. This requires a datum shift to UTM then a conversion to Lat,Lon. The original file was in the format 'east north alt name'. #!/bin/sh ifile=$1 gawk ' {print $1, $2}' $ifile | #pipe easting and northing into converter cs2cs -s -I -f "%.6f" \ +proj=latlong +datum=WGS84 \ +to +proj=utm +south +zone=56 +ellps=aust_SA \ +nadgrids=QLD+0900.gsb | paste - $ifile| gawk -v OFS="," '{print $1,$2,$7}'| #at this point $7 has the name of the point gpsbabel -i csv -f - -o garmin -F com1 This is probably more likely to confuse than help :-[ regards and thanks for a great tool Peter Dean ps I am using gpsbabel mainly on cygwin on windows xp proj is available as a standard cygwin package |