as.s2pp.s2im: Convert an Image/Raster on the Sphere to a Marked Point...

View source: R/s2im.R

as.s2pp.s2imR Documentation

Convert an Image/Raster on the Sphere to a Marked Point Pattern on the Sphere

Description

Convert an Image/Raster on the Sphere to a Marked Point Pattern on the Sphere

Usage

## S3 method for class 's2im'
as.s2pp(X, ...)

Arguments

X

Object of class s2im.

...

Ignored.

Value

Marked point pattern of class s2pp. The points are the image cell centers and the marks are the corresponding values.

Examples

poly <- s2polygon(cbind(lon = c(-20,-10,10,20,10,-10), lat = c(0, -10, -10, 0, 10, 10)))
f <- function(lon, lat){ sin(lon) }
im <- as.s2im.function(f, poly, level = 6)
pp <- as.s2pp(im)
plot(pp)

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