MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / validate_geometry

Function validate_geometry

nodedb-spatial/src/validate.rs:18–22  ·  view source on GitHub ↗

Validate a geometry. Returns a list of issues (empty = valid).

(geom: &Geometry)

Source from the content-addressed store, hash-verified

16
17/// Validate a geometry. Returns a list of issues (empty = valid).
18pub fn validate_geometry(geom: &Geometry) -> Vec<String> {
19 let mut issues = Vec::new();
20 validate_recursive(geom, &mut issues);
21 issues
22}
23
24/// Whether a geometry is valid (no issues).
25pub fn is_valid(geom: &Geometry) -> bool {

Callers 8

is_validFunction · 0.85
unclosed_ringFunction · 0.85
too_few_pointsFunction · 0.85
self_intersecting_ringFunction · 0.85
plan_spatial_from_whereFunction · 0.85
build_scanFunction · 0.85

Calls 1

validate_recursiveFunction · 0.85

Tested by 5

unclosed_ringFunction · 0.68
too_few_pointsFunction · 0.68
self_intersecting_ringFunction · 0.68