[GRASS-user] Re: [GRASSLIST:1088] utm data to longitude latitude

Hamish hamish_nospam at yahoo.com
Wed May 31 05:17:57 EDT 2006


> I tried to convert utm data to longitude latitude via proj.
> But I could not.
> 
> I tried this: echo 465900 4560300 | proj +proj=lonlat

Proj needs to know both the to: and from: parameters.


If using GRASS 6.1-cvs, try

echo "465900 4560300" | m.proj -o

from the UTM location.



If using GRASS 6.0, use cs2cs, not proj. (+datum support)

# shortcut (from v.in.garmin):
IN_PROJ="`g.proj -jf`"
OUT_PROJ="+proj=longlat +towgs84=0.000,0.000,0.000"

echo "$X $Y" | cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ


the m.proj script in 6.1 is just a front-end the above 6.0 cs2cs method.



Hamish




More information about the grass-user mailing list