powered by
g_is_valid() tests whether a geometry is valid.
g_is_valid()
g_is_valid(wkt)
logical scalar. TRUE if the geometry is valid, otherwise FALSE.
TRUE
FALSE
Character. OGC WKT string for a simple feature geometry.
g1 <- "POLYGON ((0 0, 10 10, 10 0, 0 0))" g_is_valid(g1) g2 <- "POLYGON ((0 0, 10 10, 10 0, 0 1))" g_is_valid(g2)
Run the code above in your browser using DataLab