g_is_empty()
tests whether a geometry has no points.
Value
logical vector of the same length as the number of input
geometries in geom
, containing TRUE
for the corresponding geometies
that are empty or FALSE
for non-empty geometries.
Examples
g1 <- "POLYGON ((0 0, 10 10, 10 0, 0 0))"
g2 <- "POLYGON ((5 1, 9 5, 9 1, 5 1))"
g_difference(g2, g1) |> g_is_empty()
#> [1] TRUE