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])
| 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). |
| 49 | pub 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 |