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
ocefunctions. Generally, settingdebug=0turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value ofdebugfirst, so that a user can often obtain deeper debugging by specifying higherdebugvalues.
Value
usrLonLat returns a list containing numerical values
lonmin, lonmax, latmin, and latmax, along with logical
value ok. The last of these indicates whether at least one point
on the plot box is invertible. Note that longitudes are in the
range from -180 to 180 degrees.
Details
Some projections, such as "wintri", have trouble inverting
points that are "off the globe". In such cases,
the returned value has lonmin, lonmax, latmin and
latmax set to NA, and ok set to FALSE.
See also
Other functions related to maps:
formatPosition(),
lonlat2map(),
lonlat2utm(),
map2lonlat(),
mapArrows(),
mapAxis(),
mapContour(),
mapCoordinateSystem(),
mapDirectionField(),
mapGrid(),
mapImage(),
mapLines(),
mapLocator(),
mapLongitudeLatitudeXY(),
mapPlot(),
mapPoints(),
mapPolygon(),
mapScalebar(),
mapText(),
mapTissot(),
oceCRS(),
oceProject(),
shiftLongitude(),
utm2lonlat()