CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-fiona

Fiona reads and writes spatial data files

88

1.10x
Overview
Eval results
Files

utilities.mddocs/

Utility Functions

Helper functions for common geospatial operations including bounds calculation, driver information, and version management.

Capabilities

Bounds Calculation

def bounds(ob):
    """
    Returns a (minx, miny, maxx, maxy) bounding box.
    
    Parameters:
    - ob: dict, feature record or geometry object
    
    Returns:
    tuple: (minx, miny, maxx, maxy) bounding box coordinates
    """

Version Information

def show_versions():
    """Display version information for debugging."""

# Module constants
__version__: str          # Fiona version (e.g., "1.10.1")
__gdal_version__: str     # GDAL version string
gdal_version: tuple       # GDAL version tuple

Usage Examples

import fiona
from fiona import bounds

# Calculate bounds from geometry
point_geom = {'type': 'Point', 'coordinates': [-122.4, 37.8]}
point_bounds = bounds(point_geom)
print(f"Point bounds: {point_bounds}")

# Calculate bounds from feature
feature = {
    'geometry': {'type': 'Point', 'coordinates': [0, 0]},
    'properties': {'name': 'Origin'}
}
feature_bounds = bounds(feature)

# Get version information
print(f"Fiona version: {fiona.__version__}")
print(f"GDAL version: {fiona.__gdal_version__}")
print(f"GDAL tuple: {fiona.gdal_version}")

# Show detailed version info for debugging
fiona.show_versions()

Install with Tessl CLI

npx tessl i tessl/pypi-fiona

docs

cli.md

collection-management.md

crs.md

data-model.md

environment.md

file-io.md

index.md

schema.md

transforms.md

utilities.md

tile.json