fsr_topological_relationships {fsr}R Documentation

Compute fuzzy topological relationships

Description

Fuzzy topological relationships are implemented by spatial plateau topological relationships. A fuzzy topological relationship expresses a particular relative position of two spatial plateau objects. Such a topological relationship determines the degree to which it holds for any two spatial plateau objects by a real value in the interval [0, 1].

Usage

spa_overlap(pgo1, pgo2, itype = "min", ret = "degree", ...)

spa_meet(pgo1, pgo2, itype = "min", ret = "degree", ...)

spa_disjoint(pgo1, pgo2, itype = "min", ret = "degree", ...)

spa_equal(pgo1, pgo2, utype = "max", ret = "degree", ...)

spa_inside(pgo1, pgo2, utype = "max", ret = "degree", ...)

spa_contains(pgo1, pgo2, utype = "max", ret = "degree", ...)

Arguments

pgo1

A pregion object.

pgo2

A pregion object.

itype

A character value that indicates the name of a function implementing a t-norm. The default value is "min", which is the standard operator of the intersection.

ret

A character value that indicates the return type of the fuzzy topological relationship. The default value is "degree" and other possible values are "list" and "bool".

...

<dynamic-dots> If ret = "bool", two additional parameters have to be informed, as described below.

utype

A character value that indicates the name of a function implementing a t-conorm. The default value is "max", which is the standard operator of the union.

Details

These functions implement the spatial plateau topological relationships between plateau region objects. The key idea of these relationships is to consider point subsets resulting from the combination of spatial plateau set operations and spatial plateau metric operations on spatial plateau objects for computing the resulting degree. The resulting degree can be also interpreted as a linguistic value.

The spatial plateau topological relationships are implemented by the following functions:

The parameter ret determines the returning value of a fuzzy topological relationship. The default value is "degree" (default), which indicates that the function will return a value in [0, 1] that represents the degree of truth of a given topological relationship.

For the remainder possible values, the functions make use of a set of linguistic values that characterize the different situations of topological relationships. Each linguistic value has an associated membership function defined in the domain [0, 1]. The fsr package has a default set of linguistic values. You can use the function spa_set_classification() to change this set of linguistic values.

The remainder possible values for the parameter ret are:

Value

The returning value is determined by the parameter ret, as described above.

References

Carniel, A. C.; VenĂ¢ncio, P. V. A. B; Schneider, M. fsr: An R package for fuzzy spatial data handling. Transactions in GIS, vol. 27, no. 3, pp. 900-927, 2023.

Underlying concepts and formal definitions of spatial plateau topological relationships and fuzzy topological relationships are respectively introduced in:

Examples

library(tibble)
library(sf)

set.seed(456)

# Generating some random points to create pgeometry objects by using spa_creator()
tbl = tibble(x = runif(10, min= 0, max = 30), 
             y = runif(10, min = 0, max = 30), 
             z = runif(10, min = 0, max = 50))

# Getting the convex hull on the points to clip plateau region objects during their constructions
pts <- st_as_sf(tbl, coords = c(1, 2))
ch <- st_convex_hull(do.call(c, st_geometry(pts)))

pregions <- spa_creator(tbl, base_poly = ch, fuzz_policy = "fcp", k = 2)

plot(pregions$pgeometry[[1]])
plot(pregions$pgeometry[[2]])

## Not run:  
# Showing the different types of returning values
spa_overlap(pregions$pgeometry[[1]], pregions$pgeometry[[2]])
spa_overlap(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")
spa_overlap(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "bool", 
           eval_mode = "soft_eval", lval = "mostly")

## Examples for evaluating the other fuzzy topological relationships
spa_meet(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")
spa_disjoint(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")
spa_equal(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")
spa_inside(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")
spa_contains(pregions$pgeometry[[1]], pregions$pgeometry[[2]], ret = "list")

## End(Not run)

[Package fsr version 2.0.1 Index]