Note: The program does not transform GRASS files, it is designed to determine coordinate values on an individual position.
The map projections currently supported are listed in etc/projections file.
Each of the above projections (with the exception of State Plane) can be computed with the spheroids listed in etc/ellipse.table file.
For example:
+40 36 31.4563 -87 2 7.8193 40n 36 31.4563 87w 2 7.8193
For example:
500000.00 4496918.64 -424489.11 1908736.13
m.proj2 inproj="proj=utm,name=utm,a=6378137.0,es=0.006694380,\ zone=32,unfact=1.0" outproj="proj=tmerc,name=tmerc,\ a=6377397.155,es=0.0066743720,lat_0=0.0,lon_0=9.0,k=1.0,\ x_0=3500000.0" input=utm.coord output=new.gk.coord
Projection parameters have to be provided, in above case: "proj" (projection type), "name" (projection name), "a" (ellipsoid: equatorial radius), "es" (ellipsoid: eccentricity squared), "zone" (zone for the area), "unfact" (conversion factor from meters to other units, e.g. feet), "lat_0" (standard parallel), "lon_0" (central meridian), "k" (scale factor) and "x_0" (false easting). Sometimes false northing is needed which is coded as "y_0". Internally, the underlying PROJ 4 projection library performs an inverse projection to latitude-longitude and then projects the coordinate list to the target projection.
Note: NO column headings are required, just the numbers.
Datum conversions are automatically handled by the PROJ.4 library, if 'datum=' is specified in both the input and output projections on the command line. (N.B. When using the command interactively, the user will not be asked for a datum, and datum transformation will not take place.)
If a datum is specified there is no need for the 'ellps=' or underlying parameters, 'a=', 'es=' etc.
Another Usage example:
m.proj2 inproj="proj=tmerc,datum=ire65,lat_0=53.5,lon_0=-8,x_0=200000,\ y_0=250000,k=1.000035" outproj="proj=ll,datum=wgs84" input=test.txtor without datum transformation:
m.proj2 inproj="proj=tmerc,ellps=modif_airy,lat_0=53.5,lon_0=-8,x_0=200000,\ y_0=250000,k=1.000035" outproj="proj=ll,datum=wgs84" input=test.txtIn this example no datum transformation will take place as a datum was not specified for the input projection. The datum specified for the output projection will thus be silently ignored and may be left out; all that is achieved a simple conversion from projected to geodetic co-ordinates, keeping the same datum (and thus also the same ellipsoid).
For more usage examples, see documentation for the PROJ.4 'cs2cs' program. [2]
[2] PROJ4 software
Last changed: $Date: 2003/02/03 21:42:06 $