Skip to main content

Rule

Enum Rule 

Source
#[non_exhaustive]
pub enum Rule {
Show 38 variants PointMustNotOverlap, PointMustNotOverlapWith, PointMustBeInside, LineMustNotHaveDangles, LineMustNotHavePseudoNodes, LineMustNotOverlap, LineMustNotOverlapWith, LineMustNotSelfOverlap, LineMustNotIntersect, LineMustNotIntersectWith, LineMustNotIntersectOrTouchInterior, LineMustNotIntersectOrTouchInteriorWith, LineMustNotSelfIntersect, LineMustBeInside, PolygonMustNotOverlap, PolygonMustNotOverlapWith, PolygonMustNotHaveGaps, GeometryMustNotBeMultipart, PointMustBeCoveredByLines, PointMustBeCoveredByLineEndpoints, PointMustBeCoveredByPolygonBoundaries, LineEndpointsMustBeCoveredByPoints, LineMustBeCoveredByPolygonBoundaries, PolygonBoundariesMustBeCoveredByLines, PolygonMustContainPoint, PolygonMustContainOnePoint, LineMustNotCrossPolygonBoundaries, GeometryMustNotBeContainedBy, PointMustBeCoveredByPolygons, PointMustNotBeInsidePolygons, PointMustNotIntersectLines, PointMustNotIntersectPolygons, LineMustBeProperlyInsidePolygons, LineMustNotOverlapWithPolygons, LineMustNotOverlapPolygonBoundaries, LineMustNotIntersectPolygons, LineEndpointsMustBeCoveredByPolygonBoundaries, PolygonMustNotContainPoints,
}
Expand description

A supported topology rule with its canonical CLI and serialization name.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PointMustNotOverlap

Report each pair of coincident points within tolerance once.

§

PointMustNotOverlapWith

Report coincident point pairs across two layers.

§

PointMustBeInside

Report points not strictly inside any polygon; boundary distances at or below tolerance are outside.

§

LineMustNotHaveDangles

Report part endpoints with one incident use after noding and clustering.

§

LineMustNotHavePseudoNodes

Report nodes with exactly two endpoint uses from distinct features. Closed loops are valid.

§

LineMustNotOverlap

Report shared linework between distinct features, once per feature pair. Self-overlaps are excluded.

§

LineMustNotOverlapWith

Report shared linework across two layers, once per feature pair.

§

LineMustNotSelfOverlap

Report linework traversed repeatedly by one feature, including its multiple parts.

§

LineMustNotIntersect

Report overlaps and interior-to-interior intersections between distinct features. Endpoint touches and self violations are excluded.

§

LineMustNotIntersectWith

Report overlaps and interior-to-interior intersections across two layers.

§

LineMustNotIntersectOrTouchInterior

Report overlaps and meetings between distinct features where at least one feature is interior.

§

LineMustNotIntersectOrTouchInteriorWith

Report overlaps and meetings across two layers where at least one feature is interior.

§

LineMustNotSelfIntersect

Report self-overlaps and true self-crossings. Closed loops and self-touches are valid.

§

LineMustBeInside

Report pieces outside the polygon union longer than tolerance. Polygon boundaries are covered.

§

PolygonMustNotOverlap

Report polygon intersection areas once per distinct feature pair, excluding slivers below tolerance.

§

PolygonMustNotOverlapWith

Report polygon intersection areas across two layers, excluding slivers below tolerance.

§

PolygonMustNotHaveGaps

Report union interior rings as gaps and exterior rings as outer-boundary. Ignore sliver holes below tolerance.

§

GeometryMustNotBeMultipart

Report features containing more than one part. A single-part Multi geometry is valid.

§

PointMustBeCoveredByLines

Every point must be within tolerance of linework, including endpoints.

§

PointMustBeCoveredByLineEndpoints

Every point must be within tolerance of an open line part endpoint. Closed parts have no endpoints.

§

PointMustBeCoveredByPolygonBoundaries

Every point must be within tolerance of an individual polygon exterior or hole boundary, including shared edges.

§

LineEndpointsMustBeCoveredByPoints

Every open line part endpoint must be within tolerance of a point. Closed parts have no endpoints.

§

LineMustBeCoveredByPolygonBoundaries

Report line pieces not covered by individual polygon boundaries, longer than tolerance. Includes hole and shared boundaries.

§

PolygonBoundariesMustBeCoveredByLines

Report exterior and hole boundary pieces without covering linework, longer than tolerance.

§

PolygonMustContainPoint

Every polygon feature must strictly contain all retained parts of at least one point feature. Count distinct FIDs.

§

PolygonMustContainOnePoint

Every polygon feature must strictly contain exactly one point feature, and every point feature must belong to exactly one polygon feature. Count distinct FIDs.

§

LineMustNotCrossPolygonBoundaries

Report entry and exit crossings of individual exterior and hole boundaries. Tangencies, endpoint contacts and shared segments are allowed.

§

GeometryMustNotBeContainedBy

Report whole cleaned features topologically contained by individual target features, excluding mutual containment. No tolerance buffer is used.

§

PointMustBeCoveredByPolygons

Every point must be inside polygon areas or within tolerance of their boundaries.

§

PointMustNotBeInsidePolygons

Report strictly interior points. Points within tolerance of polygon boundaries are allowed.

§

PointMustNotIntersectLines

Report point contacts within tolerance anywhere on linework, including endpoints.

§

PointMustNotIntersectPolygons

Report points inside polygon areas or within tolerance of their boundaries.

§

LineMustBeProperlyInsidePolygons

Every cleaned line part must be inside the polygon union and farther than tolerance from its boundary. Report the whole failing part.

§

LineMustNotOverlapWithPolygons

Report line pieces inside individual polygon areas or along their boundaries, longer than tolerance. Isolated contacts are allowed.

§

LineMustNotOverlapPolygonBoundaries

Report shared individual polygon boundary segments longer than tolerance. Crossings and isolated contacts are allowed.

§

LineMustNotIntersectPolygons

Report interior pieces, shared boundary pieces and isolated contacts with individual polygons. Boundary proximity within tolerance counts as contact.

§

LineEndpointsMustBeCoveredByPolygonBoundaries

Every open line part endpoint must be within tolerance of an exterior or hole boundary. Closed parts have no endpoints.

§

PolygonMustNotContainPoints

Report strictly contained point parts with polygon origin provenance. Points within tolerance of boundaries are allowed.

Implementations§

Source§

impl Rule

Source

pub const ALL: &'static [Self]

All 38 rules in registry order. The original 18 remain the prefix.

Source

pub const fn name(self) -> &'static str

Return the canonical slash-separated rule name.

Source

pub const fn inputs(self) -> (GeometryKind, Option<GeometryKind>)

Return the primary family and optional secondary input family.

Source

pub const fn description(self) -> &'static str

Describe the rule’s violation semantics and tolerance behavior.

Source

pub const fn summary(self) -> &'static str

Summarize the rule in plain language for rule catalogs.

Source

pub const fn arcgis(self) -> Option<&'static str>

Return the corresponding ArcGIS name, when available.

Source

pub const fn qgis(self) -> Option<&'static str>

Return the corresponding QGIS name, when available.

Source§

impl Rule

Source

pub fn check_input_count(self, other: bool) -> Result<(), Error>

Check that a secondary input is supplied exactly when the rule needs one. Callers can use this before loading layers; distinct inputs are checked at registration, which returns Error::SameLayer.

§Errors

Returns Error::Inputs with the required layer count.

Trait Implementations§

Source§

impl Clone for Rule

Source§

fn clone(&self) -> Rule

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 Rule

Source§

impl Debug for Rule

Source§

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

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

impl<'de> Deserialize<'de> for Rule

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Rule

Source§

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

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

impl Eq for Rule

Source§

impl FromStr for Rule

Source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parse an exact, case-sensitive canonical rule name.

§Errors

Returns ParseRuleError containing the unrecognized input name.

Source§

type Err = ParseRuleError

The associated error which can be returned from parsing.
Source§

impl Hash for Rule

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Rule

Source§

fn cmp(&self, other: &Rule) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Rule

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialOrd for Rule

Source§

fn partial_cmp(&self, other: &Rule) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Rule

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Rule

Auto Trait Implementations§

§

impl Freeze for Rule

§

impl RefUnwindSafe for Rule

§

impl Send for Rule

§

impl Sync for Rule

§

impl Unpin for Rule

§

impl UnsafeUnpin for Rule

§

impl UnwindSafe for Rule

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool