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

Function geometry_collection_roundtrip

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

Source from the content-addressed store, hash-verified

378
379 #[test]
380 fn geometry_collection_roundtrip() {
381 let geom = Geometry::GeometryCollection {
382 geometries: vec![
383 Geometry::point(1.0, 2.0),
384 Geometry::line_string(vec![[0.0, 0.0], [1.0, 1.0]]),
385 ],
386 };
387 let wkb = geometry_to_wkb(&geom);
388 let decoded = geometry_from_wkb(&wkb).unwrap();
389 assert_eq!(geom, decoded);
390 }
391
392 #[test]
393 fn truncated_data_returns_none() {

Callers

nothing calls this directly

Calls 2

geometry_to_wkbFunction · 0.85
geometry_from_wkbFunction · 0.85

Tested by

no test coverage detected