pub enum GeometryValidationError {
Show 18 variants
CoordinateNaN,
RingTooFewPoints {
found: usize,
min: usize,
},
RingNotClosed {
first: Coord<f64>,
last: Coord<f64>,
},
SelfIntersection,
PinchPoint,
HoleOutsideShell,
NestedHoles,
DisconnectedInteriorRing,
WrongOrientation,
CollinearRing,
RepeatedPoint,
DuplicatedRings,
MultiPointDuplicatePoints,
MultiLineStringDuplicateLines,
ZeroLengthLine(Coord<f64>),
DegenerateExterior,
NotSimple,
ExcessiveNesting,
}Expand description
Re-export all core validation items: GeoValidation, GeometryValidationError,
ValidationResult, is_valid, validate, validate_reason.
Errors reported by OGC geometry validation.
Each variant corresponds to an OGC Simple Features validity rule.
Variants§
CoordinateNaN
One or more coordinates contain NaN or infinite values.
RingTooFewPoints
A ring does not have enough distinct vertices (min 4 for rings).
RingNotClosed
A ring’s first and last coordinates are not equal (not closed).
SelfIntersection
A ring has edges that cross or overlap non-adjacent edges.
PinchPoint
A ring has a non-consecutive repeated vertex (pinch point).
HoleOutsideShell
A polygon hole lies partially or fully outside its shell.
NestedHoles
Two or more polygon holes are nested inside each other.
DisconnectedInteriorRing
An interior ring is disconnected from the shell (touching at ≥ 2 points or edges crossing).
WrongOrientation
Ring winding direction is incorrect (exterior must be CCW, interior CW).
CollinearRing
All vertices of a ring are collinear (zero area).
RepeatedPoint
Consecutive duplicate coordinates found in a geometry.
DuplicatedRings
A polygon contains two or more identical rings.
MultiPointDuplicatePoints
A MultiPoint contains the same point more than once.
MultiLineStringDuplicateLines
A MultiLineString contains the same linestring more than once.
ZeroLengthLine(Coord<f64>)
A Line has zero length (start and end coordinates are equal).
DegenerateExterior
A polygon’s exterior ring has degenerated to a line or point.
NotSimple
A LineString or MultiLineString has components that intersect at interior points.
ExcessiveNesting
A GeometryCollection has exceeded the maximum nesting depth.
Trait Implementations§
Source§impl Clone for GeometryValidationError
impl Clone for GeometryValidationError
Source§fn clone(&self) -> GeometryValidationError
fn clone(&self) -> GeometryValidationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeometryValidationError
impl Debug for GeometryValidationError
Source§impl Display for GeometryValidationError
impl Display for GeometryValidationError
Source§impl Error for GeometryValidationError
impl Error for GeometryValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for GeometryValidationError
impl PartialEq for GeometryValidationError
Source§fn eq(&self, other: &GeometryValidationError) -> bool
fn eq(&self, other: &GeometryValidationError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GeometryValidationError
Auto Trait Implementations§
impl Freeze for GeometryValidationError
impl RefUnwindSafe for GeometryValidationError
impl Send for GeometryValidationError
impl Sync for GeometryValidationError
impl Unpin for GeometryValidationError
impl UnsafeUnpin for GeometryValidationError
impl UnwindSafe for GeometryValidationError
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,
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