pub struct De9im {
pub m: [[Dimension; 3]; 3],
}Expand description
A DE-9IM 3×3 intersection matrix between two geometries.
Rows are the first geometry’s {Interior, Boundary, Exterior}, columns
the second’s. m[r][c] is the dimension of the intersection of the
first’s feature r with the second’s feature c. Mirrors Boost’s
relate::matrix (detail/relate/result.hpp).
Fields§
§m: [[Dimension; 3]; 3][row][col] over [Interior, Boundary, Exterior].
Implementations§
Source§impl De9im
impl De9im
Sourcepub fn transposed(self) -> Self
pub fn transposed(self) -> Self
Swap the two related geometries by transposing the matrix.
Sourcepub fn interior_interior(&self) -> Dimension
pub fn interior_interior(&self) -> Dimension
The [Interior][Interior] cell — do the two interiors meet, and
in what dimension.
Sourcepub fn boundary_boundary(&self) -> Dimension
pub fn boundary_boundary(&self) -> Dimension
The [Boundary][Boundary] cell.
Sourcepub fn interior_exterior(&self) -> Dimension
pub fn interior_exterior(&self) -> Dimension
The [Interior][Exterior] cell — is part of the first’s interior
outside the second.
Sourcepub fn exterior_interior(&self) -> Dimension
pub fn exterior_interior(&self) -> Dimension
The [Exterior][Interior] cell.
Sourcepub fn matches(&self, mask: &str) -> Result<bool, RelateError>
pub fn matches(&self, mask: &str) -> Result<bool, RelateError>
Test this matrix against a nine-character DE-9IM mask.
Mirrors Boost’s de9im::mask matching from
algorithms/detail/relate/result.hpp:425-505: * accepts any cell, T
accepts any non-empty cell, F accepts an empty cell, and 0/1/2
require an exact point/curve/area dimension.
§Errors
Returns RelateError::InvalidMask unless mask contains exactly
nine valid ASCII mask characters.