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

Function buffer_linestring_corridor

nodedb-spatial/src/operations.rs:392–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

390
391 #[test]
392 fn buffer_linestring_corridor() {
393 let line = Geometry::line_string(vec![[0.0, 0.0], [0.1, 0.0]]);
394 let buf = st_buffer(&line, 1000.0, 16);
395 if let Geometry::Polygon { coordinates } = &buf {
396 assert!(!coordinates[0].is_empty());
397 // Should have more points than a simple rectangle due to end caps.
398 assert!(coordinates[0].len() > 10);
399 } else {
400 panic!("expected Polygon");
401 }
402 }
403
404 #[test]
405 fn buffer_polygon_expands() {

Callers

nothing calls this directly

Calls 1

st_bufferFunction · 0.85

Tested by

no test coverage detected