View source: R/getLatLonDomain.R
getLatLonDomain | R Documentation |
The function uses the ‘GeoGrid’ object and the parameters lonLim
and latLim
passed by loadGridDataset
and calculates the corresponding
index positions.
getLatLonDomain(grid, lonLim, latLim, spatialTolerance = NULL)
grid |
Java class ‘GeoGrid’ |
lonLim |
see |
latLim |
see |
In order to deal with the problem of dateline crossing, the selection is
partitioned into two, and the part of the domain with negative eastings is put in first
place for consistent spatial mapping.
The index position of lon and lat in the corresponding axes is returned
by pointXYindex
, and is passed to the ‘readDataSlice’ method in
makeSubset
. For single point locations, this is a integer vector of length
two defining these positions, while in the case of rectangular domains its value is
c(-1L,-1L).
A list with the following items
llbbox
A list of length 1 or two depending on whether the selected domain
crosses or not the dateline and longitude units go from 0 to 360. See details.
pointXYindex
A vector of length two with the index positions of the
selected XY coordinates -in this order- in case of point selections. See details.
lonSlice
The X coordinates of the domain selected
latSlice
The Y coordinates of the domain selected
revLat
Logical. Whether the order of latitudes should be reversed or
not in order to map the data properly in the geographical space
The function assumes that datasets have degrees-east and degress-north as units of the corresponding X and Y axes.
J. Bedia, A. Cofino, M. Iturbide, S. Herrera
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.