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

Function geometry_from_wkb

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

Deserialize a Geometry from WKB bytes. Returns `None` if the bytes are malformed or truncated.

(data: &[u8])

Source from the content-addressed store, hash-verified

38///
39/// Returns `None` if the bytes are malformed or truncated.
40pub fn geometry_from_wkb(data: &[u8]) -> Option<Geometry> {
41 let mut cursor = 0;
42 read_geometry(data, &mut cursor)
43}
44
45/// Extract bounding box from WKB without full deserialization.
46///

Callers 8

wkb_bboxFunction · 0.85
point_roundtripFunction · 0.85
linestring_roundtripFunction · 0.85
polygon_roundtripFunction · 0.85
multipoint_roundtripFunction · 0.85
multipolygon_roundtripFunction · 0.85

Calls 1

read_geometryFunction · 0.85

Tested by 7

point_roundtripFunction · 0.68
linestring_roundtripFunction · 0.68
polygon_roundtripFunction · 0.68
multipoint_roundtripFunction · 0.68
multipolygon_roundtripFunction · 0.68