powered by
g_is_empty() tests whether a geometry has no points.
g_is_empty()
g_is_empty(wkt)
logical scalar. TRUE if the geometry has no points, otherwise FALSE.
TRUE
FALSE
Character. OGC WKT string for a simple feature geometry.
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()
Run the code above in your browser using DataLab