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

Function geometry_collection_roundtrip

nodedb-spatial/src/wkt.rs:353–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352 #[test]
353 fn geometry_collection_roundtrip() {
354 let geom = Geometry::GeometryCollection {
355 geometries: vec![
356 Geometry::point(1.0, 2.0),
357 Geometry::line_string(vec![[0.0, 0.0], [1.0, 1.0]]),
358 ],
359 };
360 let wkt = geometry_to_wkt(&geom);
361 assert!(wkt.starts_with("GEOMETRYCOLLECTION("));
362 let parsed = geometry_from_wkt(&wkt).unwrap();
363 assert_eq!(geom, parsed);
364 }
365
366 #[test]
367 fn case_insensitive_parse() {

Callers

nothing calls this directly

Calls 2

geometry_to_wktFunction · 0.85
geometry_from_wktFunction · 0.85

Tested by

no test coverage detected