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

Function unclosed_ring

nodedb-spatial/src/validate.rs:207–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205
206 #[test]
207 fn unclosed_ring() {
208 let geom = Geometry::polygon(vec![vec![
209 [0.0, 0.0],
210 [10.0, 0.0],
211 [10.0, 10.0],
212 [0.0, 10.0],
213 ]]);
214 let issues = validate_geometry(&geom);
215 assert!(issues.iter().any(|i| i.contains("not closed")));
216 }
217
218 #[test]
219 fn too_few_points() {

Callers

nothing calls this directly

Calls 1

validate_geometryFunction · 0.85

Tested by

no test coverage detected