itacart.serialization.tree_blob.encode_node
- itacart.serialization.tree_blob.encode_node(cell)[source]
Encode one atomic index as a standalone node.
- Parameters:
cell (
str) – Atomic index string.- Return type:
- Returns:
The node bytes, 10 for a resolution-13 cell.
- Raises:
InvalidIndexError – If the index is malformed or not atomic, or if it names row 1000, which holds the polar caps: this version of the binary codecs does not serialize them.
Example
>>> len(encode_node("NE(0625/0451)")) 4