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

Function bbox_to_polygon

nodedb-spatial/src/operations.rs:287–297  ·  view source on GitHub ↗

Convert a BoundingBox to a Polygon.

(bb: &BoundingBox)

Source from the content-addressed store, hash-verified

285
286/// Convert a BoundingBox to a Polygon.
287fn bbox_to_polygon(bb: &BoundingBox) -> Geometry {
288 Geometry::Polygon {
289 coordinates: vec![vec![
290 [bb.min_lng, bb.min_lat],
291 [bb.max_lng, bb.min_lat],
292 [bb.max_lng, bb.max_lat],
293 [bb.min_lng, bb.max_lat],
294 [bb.min_lng, bb.min_lat],
295 ]],
296 }
297}
298
299#[cfg(test)]
300mod tests {

Callers 2

st_bufferFunction · 0.85
st_envelopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected