Navigate:
~$FIONA0.2%

Fiona: Python library for geographic data files

Python library for reading and writing geographic data files like GeoPackage and Shapefile.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#375
37
DATA ENGINEERING
#14
2
30 DAY RANKING TREND
ovr#375
·Data#14
STARS
1.2K
FORKS
216
7D STARS
+2
7D FORKS
-1
See Repo:
Share:

Learn more about Fiona

Fiona is a Python library for reading and writing geographic vector data files built on top of GDAL/OGR. It uses Cython extensions to interface with the underlying GDAL C library while providing a more Pythonic API than GDAL's native bindings. The library models geographic features as data classes following the GeoJSON format specification. Fiona is commonly used for GIS data processing workflows, format conversion, and spatial data analysis pipelines.

Fiona

1

GeoJSON-based Features

Models geographic features as GeoJSON-compatible data classes rather than GDAL's native feature objects. This provides a more intuitive and standardized data structure for Python developers.

2

Streaming Interface

Implements file-like Collection objects that can stream features from large datasets without loading everything into memory. Supports filtering operations like bounding box queries during iteration.

3

Virtual File Systems

Can read from and write to zipped archives, in-memory file systems, and cloud storage locations. Handles multi-layered GIS formats through GDAL's virtual file system capabilities.


import fiona
from fiona import Feature, Geometry
from shapely.geometry import mapping, shape

# Open a file for reading
with fiona.open("input.shp") as src:
    # Get profile for output file
    profile = src.profile
    profile["schema"]["geometry"] = "Point"
    profile["driver"] = "GPKG"
    
    # Open output file and process features
    with fiona.open("output.gpkg", "w", **profile) as dst:
        for feat in src:
            # Transform geometry (example: get centroid)
            centroid_shp = shape(feat.geometry).centroid
            new_geom = Geometry.from_dict(centroid_shp)
            
            # Write transformed feature
            dst.write(
                Feature(geometry=new_geom, properties=feat.properties)
            )


v1.10.1

Fixes several typos, renames variables for clarity, and resolves logging issues with NULL object representations in CRS class.

  • Several typos were found and fixed. One variable was renamed and the ContextVar in _vsipyopener.pyx was renamed
  • Logging in the CRS class no longer tries to print representations of objects that may be NULL when searching for authority matches
v1.10.0

Major release with 25 new contributors, introducing Lisp-like filter expressions and deprecating Python-style filters and some modules.

  • Python-style filter expressions for CLI commands are being replaced by Lisp-like expressions
  • Some constants in the fiona.schema module will be removed in a future version
  • The fiona.path module will be removed in a future version
v1.10.0rc1

First release candidate for 1.10.0 that removes duplicate configuration files and includes GDAL 3.9.2 in PyPI wheels.

  • The setup.cfg duplicates project configuration in pyproject.toml and has been removed
  • PyPI wheels include GDAL 3.9.2


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers