s2grid.s2polygon: Make a grid over spherical polygonal region

View source: R/s2im.R

s2grid.s2polygonR Documentation

Make a grid over spherical polygonal region

Description

Make a grid over spherical polygonal region

Usage

s2grid.s2polygon(x, level, ...)

Arguments

x

Polygon on the sphere of class s2polygon.

level

Integer level of the pixels between 0 (each pixel is huge – millions of square kilometres on Earth) and 30 (each pixel is tiny – approximately a square cm on Earth).

...

Ignored.

Value

Object of class "s2grid", which is just a vector of unique ids of the cells making up the grid.

Examples

poly <- s2polygon(cbind(lon = c(-20,-10,10,20,10,-10), lat = c(0, -10, -10, 0, 10, 10)))
grid <- s2grid.s2polygon(poly, 5)
length(grid)

spatstat/spatstat.sphere documentation built on Jan. 27, 2023, 2:59 a.m.