#[derive(Debug, Clone, PartialEq)]
pub enum TopologyViolation {
SelfIntersection {
feature_id: u64,
segments: Vec<(usize, usize)>,
},
RingOrientation {
feature_id: u64,
ring_index: usize,
expected_ccw: bool,
},
UnclosedRing {
feature_id: u64,
ring_index: usize,
},
Overlap {
feature_a: u64,
feature_b: u64,
area: f64,
},
Gap {
feature_a: u64,
feature_b: u64,
area: f64,
},
}
#[derive(Debug, Clone)]
pub struct TopologyOptions {
pub tolerance: f64,
pub detect_gaps: bool,
pub detect_dangles: bool,
}
impl Default for TopologyOptions {
fn default() -> Self {
Self {
tolerance: 1e-9,
detect_gaps: false,
detect_dangles: false,
}
}
}