g_is_valid()
tests whether a geometry is valid.
Value
logical vector of the same length as the number of input
geometries in geom
, containing TRUE
for the corresponding geometies
that are valid or FALSE
for invalid geometries.
Examples
g1 <- "POLYGON ((0 0, 10 10, 10 0, 0 0))"
g2 <- "POLYGON ((0 0, 10 10, 10 0))"
g3 <- "POLYGON ((0 0, 10 10, 10 0, 0 1))"
g_is_valid(c(g1, g2, g3))
#> [1] TRUE FALSE FALSE