# NOT RUN {
# Creating an empty pgeometry object
pgo1 <- create_empty_pgeometry("PLATEAULINE")
# Checking if it is empty
fsr_is_empty(pgo1)
# Creating a component to populate the pgeometry object
library(sf)
md <- 0.4
pts <- rbind(c(1, 1), c(2, 3), c(2, 1))
comp <- component_from_sfg(st_multipoint(pts), md)
# Adding the component to the pgeometry object
pgo1 <- spa_add_component(pgo1, comp)
# Checking if it is still empty
fsr_is_empty(pgo1)
# }
Run the code above in your browser using DataLab