itacart.serialization.geometry_blob.decode_geometry
- itacart.serialization.geometry_blob.decode_geometry(blob)[source]
Decode a GeometryBlob into rings and profile metadata.
Rings come back in the order they were written and with the winding they were given. The exterior of a component is its first ring.
- Parameters:
blob (
bytes) – The binary blob.- Return type:
- Returns:
A mapping with
rings,geometry_type,edge_model,densification_model,max_segment_mandresolution.- Raises:
MalformedBlobError – If the blob fails structural validation.
Example
>>> blob = encode_geometry([["NE(0625/0451)"]], "POINT", resolution=1) >>> decode_geometry(blob)["rings"] [['NE(0625/0451)']]