View source: R/findPointXYindex.R
findPointXYindex | R Documentation |
Finds the XY index position of single point selections
findPointXYindex(lonLim, latLim, gcs, spatialTolerance = NULL)
lonLim |
x domain definition |
latLim |
y domain definition |
gcs |
the grid coordinate system, formally a ‘GridCoordSys’ java object |
The function applies the java method ‘findXYindexFromCoord’, being the input data the point coordinates in the native units. Thus, if longitudes are coded in the form [0-360] in the dataset, the input lonLim coordinate [-180 - 180] is converted prior to passing it to the method. The resulting pointXYindex is ultimately passed to the java method ‘readDataSlice’ after subsetting. The function also takes into account the possibility of selection of “strips”, i.e., a selection across a whole or part of a meridian/parallel.
a list with the new lonLim and latLim parameters (if changed) and the pointXYindex definition, consisting of a integer vector of length two.
J Bedia
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.