spa_support() yields a crisp spatial object (as an sfg object) that corresponds to the support of a pgeometry object given as input.
Value
An sfg object that represents the support of pgeometry. It can be an empty object, if pgeometry is empty.
Details
The spa_support() function employs the classical definition of support from the fuzzy set theory in the context of Spatial Plateau Algebra.
The support only comprises the points with membership degree greater than or equal to 1.
Hence, spa_support() returns the sfg object that represents the total extent of the pgeometry given as input.
If the pgeometry is empty, then an empty sfg object is returned.
Examples
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
#> [1] "PLATEAUPOINT ((POINT (0 0), 0.3), (MULTIPOINT ((2 2), (2 4), (2 0)), 0.5), (MULTIPOINT ((0 0.5), (2 3)), 0.7), (MULTIPOINT ((1 1), (3 1), (1 3), (3 3)), 0.9), (MULTIPOINT ((1 2), (2 1), (3 2)), 1))"
# Getting its support
spa_support(ppoint)
#> MULTIPOINT ((0 0), (0 0.5), (1 1), (1 2), (1 3), (2 0), (2 1), (2 2), (2 3), (2 4), (3 1), (3 2), (3 3))
# Getting the support of an empty pgeometry
spa_support(create_empty_pgeometry("PLATEAUREGION"))
#> MULTIPOLYGON EMPTY