is.valid | R Documentation |
Check the validity of polygons or attempt to fix it. Or check the validity of a SpatExtent.
## S4 method for signature 'SpatVector'
is.valid(x, messages=FALSE, as.points=FALSE)
## S4 method for signature 'SpatVector'
makeValid(x)
## S4 method for signature 'SpatExtent'
is.valid(x)
x |
SpatVector or SpatExtent |
messages |
logical. If |
as.points |
logical. If |
logical
topology
w <- vect("POLYGON ((0 -5, 10 0, 10 -10, 0 -5))")
is.valid(w)
w <- vect("POLYGON ((0 -5, 10 0, 10 -10, 4 -2, 0 -5))")
is.valid(w)
is.valid(w, TRUE)
plot(w)
points(cbind(4.54, -2.72), cex=2, col="red")
e <- ext(0, 1, 0, 1)
is.valid(e)
ee <- ext(0, 0, 0, 0)
is.valid(ee)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.