## NAME

m.proj2 - Calculates conversion coordinates for geographic positions.
(GRASS Map Development Program)

## SYNOPSIS

m.proj2 [inproj=name[,name,...]] [outproj=name[,name,...]] [input=name] [output=name]

### Parameters:

inproj
  Comma separated input projection parameters
outproj
  Comma separated output projection parameters
input
  Input coordinate file
output
  Output coordinate file

## DESCRIPTION

This program allows a user to (optionally interactively) convert coordinates from one projection to another. It allows a user to convert coordinates from a file, writing to a file.

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.

## INPUT FILE FORMAT

When reading from a file of LATITUDE/LONGITUDE data the file will contain three (2) columns of information:
  the first column - latitude - in degrees minutes seconds,
  the second column - longitude - in degrees minutes seconds,

For example:

    	+40 36 31.4563	-87 2 7.8193
    	40n 36 31.4563	87w 2 7.8193

When reading from a file of PROJECTION COORDINATES data the file will contain three (2) columns of information:
  the first column - easting - ground coordinates
  the second column - northing - ground coordinates

For example:

     	 500000.00	4496918.64
    	-424489.11	1908736.13

## USAGE EXAMPLE

For example, if desired to transform points from UTM projection to the Gauss-Krüger Grid System it can be done by running:

             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.

## BUGS

Datum transformations are not yet supported.

## References:

[1]Evenden, G.I. (1990) Cartographic projection procedures for the UNIX environment - a user's manual. USGS Open-File Report 90-284 (Also see Interim Report and 2nd Interim Report on Release 4, Evenden 1994).

## SEE ALSO

m.proj, s.proj, v.proj, g.setproj, i.rectify, i.rectify3, r.support, r.stats, s.sample, s.surf.idw, s.surf.rst

## AUTHOR

Bob Covill, code based on m.proj

Last changed: $Date: 2002/03/01 00:08:31 $