findPointXYindex: Define user-defined geolocation parameters

View source: R/findPointXYindex.R

findPointXYindexR Documentation

Define user-defined geolocation parameters

Description

Finds the XY index position of single point selections

Usage

findPointXYindex(lonLim, latLim, gcs, spatialTolerance = NULL)

Arguments

lonLim

x domain definition

latLim

y domain definition

gcs

the grid coordinate system, formally a ‘GridCoordSys’ java object

Details

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.

Value

a list with the new lonLim and latLim parameters (if changed) and the pointXYindex definition, consisting of a integer vector of length two.

Author(s)

J Bedia

References

http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadocAll/ucar/nc2/dt/grid/GridCoordSys.html#findXYindexFromLatLon%28double,%20double,%20int[]%29


SantanderMetGroup/loadeR documentation built on July 4, 2023, 4:29 a.m.