Fiona reads and writes spatial data files
88
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.
Install with Tessl CLI
npx tessl i tessl/pypi-fionadocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10