R: Calculate lon-lat coordinates of plot-box trace

usrLonLat {oce} | R Documentation

## Calculate lon-lat coordinates of plot-box trace

### Description

Trace along the plot box, converting from xy coordinates to lonlat coordinates. The results are used by `mapGrid` and `mapAxis` to ignore out-of-frame grid lines and axis labels.

### Usage

    usrLonLat(n = 25, debug = getOption("oceDebug"))

### Arguments

`n` | number of points to check along each side of the plot box
`debug` | an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many `oce` functions. Generally, setting `debug=0` turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of `debug` first, so that a user can often obtain deeper debugging by specifying higher `debug` values.

### Details

Note: this procedure does not work for projections that have trouble inverting points that are "off the globe". For this reason, this function examines .Projection()$projection and if it contains the string `"wintri"`, then the above-stated procedure is skipped, and the return value has each of the numerical quantities set to `NA`, and `ok` set to `FALSE`.

### Value

a list containing `lonmin`, `lonmax`, `latmin`, `latmax`, and `ok`; the last of which indicates whether at least one point on the plot box is invertible. Note that longitude are expressed in the range from -180 to 180 degrees.

### Author(s)

Dan Kelley

### See Also

Other functions related to maps: `lonlat2map`, `lonlat2utm`, `map2lonlat`, `mapArrows`, `mapAxis`, `mapContour`, `mapDirectionField`, `mapGrid`, `mapImage`, `mapLines`, `mapLocator`, `mapLongitudeLatitudeXY`, `mapPlot`, `mapPoints`, `mapPolygon`, `mapScalebar`, `mapText`, `mapTissot`, `oceCRS`, `shiftLongitude`, `utm2lonlat`

[Package oce version 1.1-1 Index]