pub enum Simplify {
None,
Rdp {
epsilon: f64,
},
Visvalingam {
min_area: f64,
},
ImaiIri {
epsilon: f64,
},
}Expand description
The algorithm choice and its parameter, for callers that thread the choice through knobs.
Variants§
None
Keeps every vertex.
Rdp
Ramer–Douglas–Peucker with a max deviation of epsilon.
Visvalingam
Visvalingam–Whyatt, which drops triangles smaller than min_area.
ImaiIri
Imai–Iri minimum-vertex simplification within a max deviation of
epsilon.
Implementations§
Source§impl Simplify
impl Simplify
Sourcepub fn from_code(code: u32, param: f64) -> Simplify
pub fn from_code(code: u32, param: f64) -> Simplify
The algorithm an ALGORITHM_NONE-family code names, carrying
param as the algorithm’s own parameter: a max deviation ε for
RDP and Imai–Iri, a minimum triangle area for Visvalingam. No ε²
derivation happens here; an ε-driven caller applies that policy
itself (see utz_encode::encode::to_simplify()). An unknown code
simplifies as Simplify::None, so coordinates pass through.
Trait Implementations§
impl Copy for Simplify
impl StructuralPartialEq for Simplify
Auto Trait Implementations§
impl Freeze for Simplify
impl RefUnwindSafe for Simplify
impl Send for Simplify
impl Sync for Simplify
impl Unpin for Simplify
impl UnsafeUnpin for Simplify
impl UnwindSafe for Simplify
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
Mutably borrows from an owned value. Read more