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

Function polygon_roundtrip

nodedb-spatial/src/wkb.rs:315–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313
314 #[test]
315 fn polygon_roundtrip() {
316 let geom = Geometry::polygon(vec![
317 vec![
318 [0.0, 0.0],
319 [10.0, 0.0],
320 [10.0, 10.0],
321 [0.0, 10.0],
322 [0.0, 0.0],
323 ],
324 vec![[2.0, 2.0], [3.0, 2.0], [3.0, 3.0], [2.0, 3.0], [2.0, 2.0]], // hole
325 ]);
326 let wkb = geometry_to_wkb(&geom);
327 let decoded = geometry_from_wkb(&wkb).unwrap();
328 assert_eq!(geom, decoded);
329 }
330
331 #[test]
332 fn multipoint_roundtrip() {

Callers

nothing calls this directly

Calls 2

geometry_to_wkbFunction · 0.85
geometry_from_wkbFunction · 0.85

Tested by

no test coverage detected