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 Python tool that converts property data types in GIS vector datasets. The tool should read features from an input dataset, convert specified property fields to new data types, and write the result to an output dataset.
Your tool should:
Your tool must handle conversions between these data types:
int, floatstrdate, datetimebytes@generates
def convert_field_types(
input_path: str,
output_path: str,
type_mapping: dict[str, str],
output_driver: str = "GeoJSON"
) -> None:
"""
Convert field types in a GIS dataset.
Args:
input_path: Path to the input dataset
output_path: Path to the output dataset
type_mapping: Dictionary mapping field names to target types
(e.g., {"population": "int", "recorded": "datetime"})
output_driver: Output format driver (default: "GeoJSON")
"""
passProvides GIS data reading and writing with field type support.