bdist.sphwin: Boundary Distances

View source: R/bdist.sphwin.R

bdist.sphwinR Documentation

Boundary Distances

Description

Calculate the minimum great circle distance from a point (or each of a set of points) to the boundary of a window on the sphere.

Usage

bdist.sphwin(X, win = sphwin(type = "sphere"))

Arguments

X

The locations of the points for which the boundary distance is calculated. Either a 2 column matrix with locations of points in spherical coordinates, a 3 column matrix with locations of points in Cartesian coordinates, or an object of class "sp2" or "sp3".

win

The window. An object of class "sphwin".

Details

This function uses the dot product to calculates\ the minimum great circle distance from a point (or each of a set of points) to the boundary of a region on the sphere that can be defined using sphwin.

Value

A numeric of length equal to the number of points in X. The first value is the minimum boundary distance for the point in the first row of X, and so on.

Note

This function is the analogue for point patterns on the sphere of the function bdist.points in spatstat.

Author(s)

Tom Lawrence tjlawrence@bigpond.com

See Also

bdist.points, nndistsph (nearest neighbour distances), pairdistsph (pairwise distances), gcdist (great circle distance between two points)

Examples

sphcap <- sphwin(type="band", param=c(0, pi/3), ref=c(0,0))
rpp.sc <- rpoispp.sphwin(win=sphcap, lambda=10)
bdist.sphwin(X=rpp.sc, win=sphcap)

baddstats/spherstat documentation built on Feb. 6, 2023, 1:45 a.m.