#[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
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
impl Rule
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
All 38 rules in registry order. The original 18 remain the prefix.
Sourcepub const fn inputs(self) -> (GeometryKind, Option<GeometryKind>)
pub const fn inputs(self) -> (GeometryKind, Option<GeometryKind>)
Return the primary family and optional secondary input family.
Sourcepub const fn description(self) -> &'static str
pub const fn description(self) -> &'static str
Describe the rule’s violation semantics and tolerance behavior.
Sourcepub const fn summary(self) -> &'static str
pub const fn summary(self) -> &'static str
Summarize the rule in plain language for rule catalogs.
Source§impl Rule
impl Rule
Sourcepub fn check_input_count(self, other: bool) -> Result<(), Error>
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§
impl Copy for Rule
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Rule
Source§impl Ord for Rule
impl Ord for Rule
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Rule
impl PartialOrd for Rule
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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