[GRASSLIST:5726] Re: projection conversion

Hamish hamish_nospam at yahoo.com
Thu Feb 10 18:05:54 EST 2005


> i´ve got a ascii-point-file from bird and amphibian watching measured
> in the Austrian Gauss-Krüger grid system (zone M31) based on the
> transverse mercator projection and the bessel ellipsoid:
> 
> 43504.88195 326077.81792
> 44075.95816 324073.80644
> 44075.95816 324073.80644
> 44075.95816 324073.80644
> 44075.95816 324073.80644
> 43720.53742 324984.62938
> 43720.53742 324984.62938
> 43720.53742 324984.62938
> ....
> 
> i would need the points in a latitude-longitude format (geographic
> coordinate system). but i´m not sure about the procedure to get it:
> 
> 1 - create a new location with epsg-code  31285 (MGI / M31)
> 2 _ import the ascii-file with v.in.ascii
> 3 _ create a new location with latitude-longitudinal coordinate
> system, the hermannskogel datum and the Datum Transformation Parameter
> 1 for Austria  4 _ projection conversion with v.proj
> 5 _ export with v.out.ogr or v.out.ascii
> 
> is there may be a shorter way to do this?


if you just need the numbers, not a new vector point map, you could try:


with GRASS 5.4 if you have it installed:

> 1 - create a new location with epsg-code  31285 (MGI / M31)

cat input_points_xy.txt | m.proj2 -o

done.



with GRASS 5.7

> 1 - create a new location with epsg-code  31285 (MGI / M31)

IN_PROJ="`g.proj -jf`"
OUT_PROJ="+proj=longlat +towgs84=0.000,0.000,0.000"
cat input_points_xy.txt | cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ

done.


I've been meaning to write the 5.7 solution into a m.proj2 -i -o like
script; biggest problem is what to call it. g.reproj??


Hamish




More information about the grass-user mailing list