Skip to main content

is_valid

Function is_valid 

Source
pub fn is_valid<G>(geometry: &G) -> Result<(), ValidityFailure>
where G: Geometry, G::Kind: ValidityStrategyForKind, <G::Kind as ValidityStrategyForKind>::S: ValidityStrategy<G>,
Expand description

Validate an areal geometry through its public geometry-kind tag.

Mirrors boost::geometry::is_valid from boost/geometry/algorithms/detail/is_valid/interface.hpp:155-202. Rings, polygons, and multi-polygons use their corresponding validators; unsupported kinds fail at compile time instead of returning an uninformative runtime value.

ยงErrors

Returns the first ValidityFailure detected by the selected areal validator.