isIntersecting | R Documentation |
Determine whether polygons found in a PolySet are self-intersecting.
isIntersecting (polys, numericResult = FALSE)
polys |
PolySet to use. |
numericResult |
Boolean value; if |
When numericResult = TRUE
, this function counts intersections
as the algorithm processes them. It counts certain types (i.e., those
involving vertices and those where an edge retraces over an edge) more
than once.
The function does not give special consideration to holes. It returns
a value for each unique (PID
, SID
), regardless of
whether a contour represents a hole.
PolyData with columns PID
, SID
(may be missing),
and intersecting
. If numericResult
is TRUE
,
intersecting
contains the number of intersections. Otherwise,
it contains a Boolean value.
Nicholas M. Boers, Staff Software Engineer
Jobber, Edmonton AB
Last modified Rd: 2013-04-10
isConvex
,
PolySet.
local(envir=.PBSmapEnv,expr={
#--- load the data (if using R)
if (!is.null(version$language) && (version$language=="R"))
data(nepacLL,envir=.PBSmapEnv)
#--- calculate then print the polygons that are self-intersecting
p <- isIntersecting(nepacLL, numericResult = FALSE)
print(p[p$intersecting,])
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.