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

Function wkb_bbox

nodedb-spatial/src/wkb.rs:49–52  ·  view source on GitHub ↗

Extract bounding box from WKB without full deserialization. Scans coordinate values to find min/max. Faster than full deserialize when only the bbox is needed (e.g., R-tree insertion from Arrow batch).

(data: &[u8])

Source from the content-addressed store, hash-verified

47/// Scans coordinate values to find min/max. Faster than full deserialize
48/// when only the bbox is needed (e.g., R-tree insertion from Arrow batch).
49pub fn wkb_bbox(data: &[u8]) -> Option<nodedb_types::BoundingBox> {
50 let geom = geometry_from_wkb(data)?;
51 Some(nodedb_types::geometry_bbox(&geom))
52}
53
54// ── Write helpers ──
55

Callers 1

wkb_bbox_extractionFunction · 0.85

Calls 2

geometry_from_wkbFunction · 0.85
geometry_bboxFunction · 0.85

Tested by 1

wkb_bbox_extractionFunction · 0.68