| oceProject {oce} | R Documentation |
This function is used to isolate other oce functions from
changes to the project function in the rgdal
package, which is used for calculations involved in both forward
and inverse map projections.
oceProject(xy, proj, inv = FALSE, use_ob_tran = FALSE, legacy = TRUE, passNA = FALSE)
xy |
|
proj |
" |
inv |
" |
use_ob_tran |
" |
legacy |
" |
passNA |
Logical value indicating whether to pass NA values into
rgdal. The default is |
Some highlights of the evolving relationship with rgdal are:
See https://github.com/dankelley/oce/issues/653#issuecomment-107040093
for the reason why oce switched from using rawTransform,
to project, both functions provided by the
rgdal package.
2016 Apr: rgdal::project started returning named quantities
2019 Feb: allowNAs_if_not_legacy was added in rgdal 1.3-9 to prevent
an error on i386/windows. However, using this argument imposes a
burden on users to update rgdal, so the approach taken
here (by default, i.e. with passNA=FALSE) is to
temporarily switch NA data to 0, and then switch
back to NA after the calculation.
A two-column matrix, with first column holding either
longitude or x, and second column holding either
latitude or y.