R: Map projection

UTM.xy {GEOmap} | R Documentation

## Map projection

### Description

UTM Map projection parameters supplied and LAT-LON, return the x-y values, WGS-84 datum

### Usage

    UTM.xy(phideg,  lamdeg, PROJ.DATA)
    utm.wgs84.xy(phideg,  lamdeg, PROJ.DATA)

### Arguments

`phideg` | Latitude
`lamdeg` | Longitude
`PROJ.DATA` | list of projection parameters

### Value

List

`x` | x-coordinate
`y` | y-coordinate

### Note

When calling the conversion from LL to XY or vice versa, convert the lon to 0 to 360. Use RPMG::fmod for this conversion. This may be rectified in future revisions.

### Author(s)

Jonathan M. Lees<jonathan.lees.edu>

### References

Snyder, J. P., 1987; Map Projections - A Working Manual. U.S. Geological Survey Professional Paper 1395, 383 p.

### See Also

setPROJ, GLOB.XY, projtype, utm.sphr.xy, UTMzone, plotUTM, utmbox, DATUMinfo

### Examples

    lat = 40.5
    lon = -73.50
    lon0 = -75
    LON = RPMG::fmod(lon, 360)

    wproj = setPROJ(type = 5, LAT0 = 0 , LON0 = lon0 , FE = 0 )

    u1 = utm.elps.xy(lat, LON ,wproj )
    utm.wgs84.xy(lat, LON ,wproj)

    ####  also for more general UTM:
    ###  this is the wgs84 projection
    wproj1 = setPROJ(type = 8, LAT0 = 0 , LON0 = lon0 , FE = 0 , IDATUM=1 )
    UTM.xy(lat, LON,wproj1)

    ###  this is the Clark-1866 (see page 270 in Snyder)
    wproj8 = setPROJ(type = 8, LAT0 = 0 , LON0 = lon0 , FE = 0 , IDATUM=8)
    UTM.xy(lat, LON,wproj8)

    ##  which is the same as:

    uzone = UTMzone(lat, lon)

    lon0 = uzone$CEN[2]
    wproj = setPROJ(type = 5, LAT0 = 0 , LON0 = lon0 , FE = 500000 )
    utm.elps.xy(lat, LON,wproj )

    ## to see all the Datums, use: DATUMinfo()

[Package GEOmap version 2.4-0 Index]