NAME

m.ll2u - Converts geographic coordinates to Universal Transverse Mercator (UTM) coordinates.
(GRASS Data Import/Processing Program)

SYNOPSIS

m.ll2u
m.ll2u help
m.ll2u [-rwoz] spheroid=name [zone=value] [input=name] [output=name]

DESCRIPTION

m.ll2u converts geographic coordinates (i.e., latitudes and longitudes) to Universal Transverse Mercator (UTM) eastings and northings.

OPTIONS

The user must specify the spheroid on which to base the UTM conversion. The user may optionally specify the UTM zone; however, the program can determine this from the geographic coordinates submitted.

The list of spheroids available is somewhat dynamic. At the time of this release, available spheroids included: airy, australian, bessel, clark66, everest, grs80, hayford, international, krasovsky, wgs66, wgs72, and wgs84 (see table below).

This command can be run either non-interactively or interactively. The user can run the program non-interactively by entering desired flag settings and parameter values on the command line using the following format:

m.ll2u [-rwoz] spheroid=name [zone=value] [input=name] [output=name]
Alternately, the user can simply type:
m.ll2u
on the command line. In this case, the user will be prompted for parameter values and flag settings through the standard interface described in the manual entry for parser.

Input can be entered from the keyboard or from an input file. In either case, input should be entered with one longitude and latitude pair per line, in either of the below forms:

degrees:minutes:seconds{E|W} degrees:minutes:seconds{N|S}
degrees:minutes:seconds{E|W} degrees:minutes:seconds{N|S}
degrees:minutes:seconds{E|W} degrees:minutes:seconds{N|S}
degrees:minutes:seconds{E|W} degrees:minutes:seconds{N|S}
.
.
end
degrees.decimal{E|W} degrees.decimal{N|S}
degrees.decimal{E|W} degrees.decimal{N|S}
degrees.decimal{E|W} degrees.decimal{N|S}
degrees.decimal{E|W} degrees.decimal{N|S}
.
.
end
If the user sets the -r flag, m.ll2u will expect the order of the coordinates to be reversed, and stated as latitude, longitude pairs, rather than as longitude, latitude pairs.

Similarly, the user can elect to send output to an output file or (by default) to standard output (the user's terminal screen). If the user sets the -w flag, output will be printed in a format suitable for input to programs like d.points. Example input and output are shown below (see EXAMPLE).

Program flag settings and parameters have the following meanings.

Flags:

-r
The order of coordinates is reversed in the input, and entered as: lat lon
-w
Do not flag invalid lon,lat input lines as errors.
-o
Flag other invalid input lines as errors.
-z
Suppress printing of the UTM zone in the output. (Note. This will produce output in a format suitable for direct input to programs like d.points.)

Parameters:

spheroid=name
Reference spheroid (ellipsoid).
Options: airy, australian, bessel, clark66, everest, grs80, hayford, international, krasovsky, wgs66, wgs72, wgs84
zone=value
UTM zone number (results will be forced into this UTM zone).
Options: 1-60
input=name
Name of an existing input file containing longitude, latitude coordinates to be converted. Input lines may either be input in the form of degrees:minutes:seconds, or as decimal degrees. If input as decimal degrees, m.ll2u recognizes negative numbers.
output=name
Name to be assigned to the output file containing UTM coordinates and zone designations.

AVAILABLE SPHEROIDS

(The on-line listing includes only the spheroid names)
Spheroid:    |Semi-major axis| Eccentricity     |  Commonly 
             | Equatorial    | sqrd (e),        |  used for:
             | Radius (a):   | Flattening (f) or|
             |               | Polar Radius (b):|
_____________|_______________|__________________|______________
airy         | a=6377563.396 | e=.006670540     |
australian   | a=6378160     | f=1/298.25       | Australia
bessel       | a=6377397.155 | e=.006674372     | Japan
clark66      | a=6378206.4   | b=6356583.8      | N. America
everest      | a=6377276.345 | e=.0066378466    | India, Burma
grs80        | a=6378137     | f=1/298.257      |
hayford      | a=6378388     | f=1/297          |
international| a=6378388     | f=1/297          | Europe
krasovsky    | a=6378245     | f=1/298.3        |
wgs66        | a=6378145     | f=1/298.25       | worldwide cov
wgs72        | a=6378135     | f=1/298.26       | worldwide cov
wgs84        | a=6378137     | f=1/298.257223563| worldwide cov

EXAMPLE

Assume the user has input the command:
m.ll2u spheroid=wgs72 input=ll.infile output=utm.outfile
where the input file ll.infile contains the following longitude, latitude values:
	155:30:00W 19:35:00N<
	165:30:00W 19:35:00N<
	145:30:00W 20:00:00N<
	135:30:00W 21:00:00N<
Output would then be sent to the output file utm.outfile, containing the below Easting and Northing coordinate values and UTM zone designations:
	237740.85270818 2167292.1076231  5
	447560.64349407 2165450.19058336 3
	656921.61734802 2212183.40032627 6
	448035.11644906 2322228.3038167  8
	end

NOTES

Spheroids, the solids associated with an ellipse, are also known as ellipsoids. They are used as the best possible model to simulate the shape of the earth with its flattened poles and bulging equator. They are the mathematical means for establishing control points to use as a reference when determining exact locations on the earth. A cohesive set of these control points is called a datum.

The spheroids listed above have been used as the basis for a number of different datums. The North American Datum of 1927 (NAD 27) was based on the Clark 1866 ("clark66") spheroid. This was a recent current standard datum for North America. Be aware, however, that a new datum, NAD 83, has been developed using the Geodetic Reference System 1980 spheroid; this is now available in m.ll2u as the "grs80" spheroid. The "wgs66", "wgs72", and "wgs84" spheroids are for worldwide use. The "wgs72" spheroid has been used fairly widely by the Department of Defense (DOD) and is the basis for the World Geodetic System 1972 datum. This datum has also been recently replaced; the new DOD datum is WGS 84 (wgs84). Both datums are available within m.ll2u.

To use spheroids other than those listed here, the user can add lines to the ellipsoid parameter definition file in $GISBASE/etc/ellipse.table.

Read the marginalia of your source map to determine which spheroid was used to produce the map on which you are working.

This program recognizes negative numbers if coordinates are input in decimal degrees rather than in the form of degrees:minutes:seconds.

This program has received only limited testing. It should be used with some caution.

FILES

See ellipsoid parameter definition file in $GISBASE/etc/ellipse.table.

SEE ALSO

For australian, clark66, grs80, hayford, international, krasovsky, and wgs72 ellipsoid parameters, see:
John P. Snyder, Map Projections - A Working Manual, U.S. Government Printing Office, Washington DC, 1989. U.S. Geological Survey Professional Paper 1395; from Table 1, p.12.

For bessel, airy, everest, and wgs66 ellipsoid parameter values, see:
Thomas O. Seppelin, The Department of Defense World Geodetic System 1972, presented at the International Symposium on Problems Related to the Redefinition of North American Geodetic Networks, Fredericton, New Brunswick, Canada in May, 1974; see Table 9, p.35.

For wgs84 parameter values, see:
U.S. Naval Oceanographic Labs.

Also read GRASS User's Reference Manual entries for:
d.label
d.points
d.sites
d.where
m.datum.shift
m.gc2ll
m.ll2gc
m.u2ll
parser

AUTHOR

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory