Navigate:
~$FIONA0.0%

Fiona: Python library for geographic data files

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

LIVE RANKINGS • 02:15 PM • STEADY
OVERALL
#440
261
DATA ENGINEERING
#13
7
30 DAY RANKING TREND
ovr#440
·Data#13
STARS
1.2K
FORKS
217
7D STARS
0
7D FORKS
+2
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

1.10.1

  • Several typos were found and fixed (#1448). 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 (#1445).
v1.10.0

This is 1.10.0. At last! The project has added 25 new contributors since 1.9.0, for a total of 73.

  • 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. This, and the previously mentioned constants, were not meant to be used by projects downstream.
v1.10.0rc1

This is the first release candidate for 1.10.0.

  • 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