in.W | R Documentation |
This function determines whether a given point or points is/are inside the given window, which is a (subset) of the sphere.
in.W(points, win)
points |
A 2 column matrix giving the locations of all points to be tested. |
win |
The window. An object of type |
This function establishes whether each point in points
is in
the window specified in win
. A point is considered to be in
the window if it is within or on the boundaries of the window,
including the vertices.
The algorithm used in the case that win
is a spherical polygon is that developed by Bevis and Chatelain (1989).
A logical of same length as the number of points being tested. The
first element is TRUE if the point whose coordinates are in the first
row of points
is in the window specified in win
, and
FALSE otherwise.
On any sphere, the boundaries that define a window W on the sphere also define a second shape W2, that containing all the boundaries and vertices of W, and the complement of W. Since the two shapes have boundaries and vertices in common, the set of all points that this function would identify as being outside W is not the set of all points in W2.
Tom Lawrence <email:tjlawrence@bigpond.com>
Bevis, M. and Chatelain J.-L. (1989) Locating a point on a spherical surface relative to a spherical polygon of arbitrary shape. Mathematical Geology 21, no. 8, pp. 811–827.
sphcap <- sphwin(type="band", param=c(0, pi/3), ref=c(0,0)) sphband <- sphwin(type="band", param=c(pi/6, pi/2), ref=c(0,0)) rpp.band <- rpoispp.sphwin(win=sphband, lambda=10) in.W(points=rpp.band, win=sphcap)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.