Fiona reads and writes spatial data files
88
A utility for efficiently loading large collections of geographic features into GIS datasets with proper transaction handling and error recovery.
Write features to a GeoPackage dataset while leveraging automatic transaction batching for optimal performance.
Ensure that when errors occur during bulk writes, the system behaves predictably.
Write features to various GIS formats that support transaction operations.
@generates
def load_features(features, output_path, driver='GPKG', crs='EPSG:4326'):
"""
Load a list of geographic features into a GIS dataset.
Args:
features: List of feature dictionaries with 'geometry' and 'properties' keys.
Each geometry should have 'type' and 'coordinates'.
Example: {'geometry': {'type': 'Point', 'coordinates': [0, 0]},
'properties': {'name': 'Location 1'}}
output_path: Path to the output file
driver: Output format driver (default: 'GPKG' for GeoPackage)
crs: Coordinate reference system (default: 'EPSG:4326')
Returns:
Number of features successfully written
Raises:
ValueError: If features list is empty or contains invalid data
IOError: If output file cannot be created or written
"""
passProvides GIS data I/O capabilities with transaction support for efficient bulk writes.
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