This function is used to isolate other oce functions from
changes to the map-projection functions that are done in the sf
package. (Until 2020 December, the rgdal
package was used,
after a year of tests ensuring that the results of the two packages were
the same.)
oceProject(xy, proj, inv = FALSE, debug = getOption("oceDebug"))
oceProject
returns a two-column matrix, with first column
holding either longitude
or x
, and second column holding either
latitude
or y
.
two-column numeric matrix specifying locations. If inv
is False, then xy[,1]
will hold longitude and xy[,2]
will hold
latitude, but if inv
is True, then the columns will be easting
and northing values (in metres).
a character value specifying the desired map
projection. See the projection
parameter of mapPlot()
for
details, including a historical note dated 2023-04-11 about the
now-deprecated sp
package.
logical value, False by default, indicating whether an inverse projection is requested.
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.
Dan Kelley
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()
,
shiftLongitude()
,
usrLonLat()
,
utm2lonlat()