locate-methods: Basic lookup function of coordinates on an icosahedral grid

Description Usage Arguments Value Examples

Description

Basic lookup function of coordinates on an icosahedral grid

Usage

1
2
3
4
5
6
7
8
9
locate(gridObj, ...)

## S4 method for signature 'trigrid'
locate(gridObj, data, randomborder = FALSE,
  output = "ui")

## S4 method for signature 'hexagrid'
locate(gridObj, data, output = "ui",
  randomborder = FALSE, forceNA = FALSE)

Arguments

gridObj

a trigrid or hexagrid class object.

...

arguments passed to class specific methods.

data

Coordinates of individual points. Can be either a two-dimensional matrix of long-lat coordinates, a three-dimensional matrix of XYZ coordinates, or a set of points with class 'SpatialPoints'.

randomborder

Logical value. Defaults to FALSE. If TRUE, then the points falling on vertices and edges will be randomly assigned, otherwise they will be kept as NAs.

output

Character value either "ui" or "skeleton". ui returns the face names used in the user interface, while "skeleton" returns their indices used in back-end procedures.

forceNA

logical value, suppressing the recursive lookup of points falling on subface boundaries.

Value

The function returns the cell names where the input coordinates fall.

Examples

1
2
3
4
5
6
# create a grid 
g <- trigrid(4)
# some random points
randomPoints<-rpsphere(4, output="polar")
# cells
locate(g, randomPoints)

adamkocsis/icosa documentation built on May 7, 2019, 2:28 p.m.