tessl install tessl/pypi-fiona@1.10.0Fiona reads and writes spatial data files
Agent Success
Agent success rate when using this tile
88%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.1x
Baseline
Agent success rate without this tile
80%
Build a utility that converts between different geometry representation formats, with a focus on binary geometry handling.
Create a Python module that provides functionality to:
The module should handle common geometry types including:
@generates
def wkb_to_geometry(wkb_bytes):
"""
Parse WKB binary data and return a geometry dictionary.
Parameters:
- wkb_bytes: bytes, Well-Known Binary geometry data
Returns:
dict: GeoJSON-like geometry with 'type' and 'coordinates' keys
"""
def geometry_to_wkb(geometry):
"""
Convert a geometry dictionary to WKB binary format.
Parameters:
- geometry: dict, GeoJSON-like geometry with 'type' and 'coordinates'
Returns:
bytes: Well-Known Binary representation of the geometry
"""
def validate_roundtrip(geometry):
"""
Validate that a geometry survives round-trip conversion to WKB and back.
Parameters:
- geometry: dict, GeoJSON-like geometry
Returns:
bool: True if the round-trip conversion produces an equivalent geometry
"""Provides geospatial data reading and writing capabilities, including WKB binary geometry handling.