From 71f41686c0c3f0ed4f24e30c7a0f647011a50d45 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 9 Dec 2024 16:38:16 -0800 Subject: [PATCH] changelog entry --- geo/CHANGES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/geo/CHANGES.md b/geo/CHANGES.md index e33b422d8..efbd78bdd 100644 --- a/geo/CHANGES.md +++ b/geo/CHANGES.md @@ -4,6 +4,20 @@ - Loosen bounds on `RemoveRepeatedPoints` trait (`num_traits::FromPrimitive` isn't required) - +- Added: `Validation` trait to check validity of `Geometry`. + - https://github.com/georust/geo/pull/1279 + ``` + // use in control flow + if polygon.is_valid() { foo() } + + // raise an error if invalid + polygon.check_validation()?; + + // get all validation errors + let errors = polygon.validation_errors(); + // error implements Display for human readable explanations + println!("{}", errors[0]); + ``` ## 0.29.3 - 2024.12.03