View source: R/general_operations.R
| spa_core | R Documentation |
pgeometry objectspa_core() yields a crisp spatial object (as an sfg object) that corresponds to the core of a pgeometry object given as input.
spa_core(pgo)
pgo |
A |
The spa_core() function employs the classical definition of core from the fuzzy set theory in the context of Spatial Plateau Algebra.
The core only comprises the points with membership degree equal to 1.
Hence, this operation returns the sfg object that represents the component labeled with
membership degree equal to 1 of the pgeometry object given as input. If the pgeometry object has no core, then an empty sfg object is returned.
An sfg object that represents the core of pgo. It can be an empty object, if pgo does not have a component with membership degree 1.
Underlying concepts and formal definitions of Spatial Plateau Algebra are introduced in:
pcp1 <- create_component("POINT(0 0)", 0.3)
pcp2 <- create_component("MULTIPOINT((2 2), (2 4), (2 0))", 0.5)
pcp3 <- create_component("MULTIPOINT((1 1), (3 1), (1 3), (3 3))", 0.9)
pcp4 <- create_component("MULTIPOINT((1 2), (2 1), (3 2))", 1)
pcp5 <- create_component("MULTIPOINT((0 0.5), (2 3))", 0.7)
pcp6 <- create_component("MULTIPOINT((0 1), (3 3.5))", 0.85)
pcp7 <- create_component("MULTIPOINT((1 0), (4 2))", 0.4)
# Creating a plateau point object
ppoint <- create_pgeometry(list(pcp1, pcp2, pcp3, pcp4, pcp5), "PLATEAUPOINT")
ppoint
# Getting its core
spa_core(ppoint)
# Getting the core of an empty pgeometry
spa_core(create_empty_pgeometry("PLATEAUREGION"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.