Skip to main content

De9im

Struct De9im 

Source
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

Source

pub fn transposed(self) -> Self

Swap the two related geometries by transposing the matrix.

Source

pub fn interior_interior(&self) -> Dimension

The [Interior][Interior] cell — do the two interiors meet, and in what dimension.

Source

pub fn boundary_boundary(&self) -> Dimension

The [Boundary][Boundary] cell.

Source

pub fn interior_exterior(&self) -> Dimension

The [Interior][Exterior] cell — is part of the first’s interior outside the second.

Source

pub fn exterior_interior(&self) -> Dimension

The [Exterior][Interior] cell.

Source

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.

Trait Implementations§

Source§

impl Clone for De9im

Source§

fn clone(&self) -> De9im

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for De9im

Source§

impl Debug for De9im

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for De9im

Source§

impl PartialEq for De9im

Source§

fn eq(&self, other: &De9im) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for De9im

Auto Trait Implementations§

§

impl Freeze for De9im

§

impl RefUnwindSafe for De9im

§

impl Send for De9im

§

impl Sync for De9im

§

impl Unpin for De9im

§

impl UnsafeUnpin for De9im

§

impl UnwindSafe for De9im

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SameAs<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.