View source: R/basic_functions.R
spa_is_empty | R Documentation |
pgeometry
object is emptyspa_is_empty()
checks whether a given pgeometry
object is empty (i.e., if it does not contain components).
spa_is_empty(pgo)
pgo |
A |
The spa_is_empty()
function checks if a pgeometry object has any component or not. If the number of components of a pgeometry
object is equal to 0, then
it returns TRUE
. Otherwise, it returns FALSE
.
A Boolean value that indicates if a pgeometry
is empty.
# Creating an empty plateau line object
pgo1 <- create_empty_pgeometry("PLATEAULINE")
# Checking if it is empty
spa_is_empty(pgo1)
# Adding a component to it and checking if it still empty
comp <- create_component("LINESTRING(1 1, 2 2, 2 3)", 0.5)
pgo1 <- spa_add_component(pgo1, comp)
spa_is_empty(pgo1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.