fiona

Fiona reads and writes geographic data files

https://github.com/toblerity/fiona

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 78 committers (5.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.9%) to scientific vocabulary

Keywords

cli cython gdal gis ogr python vector

Keywords from Contributors

closember ogc-api speed ogc-services osgeo sos mapserver wcs web-mapping gml
Last synced: 4 months ago · JSON representation ·

Repository

Fiona reads and writes geographic data files

Basic Info
  • Host: GitHub
  • Owner: Toblerity
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage: https://fiona.readthedocs.io/
  • Size: 3.86 MB
Statistics
  • Stars: 1,202
  • Watchers: 46
  • Forks: 209
  • Open Issues: 42
  • Releases: 25
Topics
cli cython gdal gis ogr python vector
Created almost 14 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Code of conduct Citation Security

README.rst

=====
Fiona
=====

.. image:: https://github.com/Toblerity/Fiona/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/Toblerity/Fiona/actions/workflows/tests.yml
.. image:: https://github.com/Toblerity/Fiona/actions/workflows/test_gdal_latest.yml/badge.svg
   :target: https://github.com/Toblerity/Fiona/actions/workflows/test_gdal_latest.yml
.. image:: https://img.shields.io/pypi/v/fiona
   :target: https://pypi.org/project/fiona/
.. image:: https://api.securityscorecards.dev/projects/github.com/Toblerity/Fiona/badge
   :target: https://securityscorecards.dev/viewer/?uri=github.com/Toblerity/Fiona

Fiona streams simple feature data to and from GIS formats like GeoPackage and
Shapefile.

Fiona can read and write real-world data using multi-layered GIS formats,
zipped and in-memory virtual file systems, from files on your hard drive or in
cloud storage. This project includes Python modules and a command line
interface (CLI).

Fiona depends on `GDAL `__ but is different from GDAL's own
`bindings `__. Fiona is designed to
be highly productive and to make it easy to write code which is easy to read.

Installation
============

Fiona has several `extension modules
`__ which link against
libgdal. This complicates installation. Binary distributions (wheels)
containing libgdal and its own dependencies are available from the Python
Package Index and can be installed using pip.

.. code-block:: console

    pip install fiona

These wheels are mainly intended to make installation easy for simple
applications, not so much for production. They are not tested for compatibility
with all other binary wheels, conda packages, or QGIS, and omit many of GDAL's
optional format drivers. If you need, for example, GML support you will need to
build and install Fiona from a source distribution. It is possible to install
Fiona from source using pip (version >= 22.3) and the `--no-binary` option. A
specific GDAL installation can be selected by setting the GDAL_CONFIG
environment variable.

.. code-block:: console

    pip install -U pip
    pip install --no-binary fiona fiona

Many users find Anaconda and conda-forge a good way to install Fiona and get
access to more optional format drivers (like GML).

Fiona 1.10 requires Python 3.8 or higher and GDAL 3.4 or higher.

Python Usage
============

Features are read from and written to file-like ``Collection`` objects returned
from the ``fiona.open()`` function. Features are data classes modeled on the
GeoJSON format. They don't have any spatial methods of their own, so if you
want to transform them you will need Shapely or something like it. Here is an
example of using Fiona to read some features from one data file, change their
geometry attributes using Shapely, and write them to a new data file.

.. code-block:: python

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

    # Open a file for reading. We'll call this the source.
    with fiona.open(
        "zip+https://github.com/Toblerity/Fiona/files/11151652/coutwildrnp.zip"
    ) as src:

        # The file we'll write to must be initialized with a coordinate
        # system, a format driver name, and a record schema. We can get
        # initial values from the open source's profile property and then
        # modify them as we need.
        profile = src.profile
        profile["schema"]["geometry"] = "Point"
        profile["driver"] = "GPKG"

        # Open an output file, using the same format driver and coordinate
        # reference system as the source. The profile mapping fills in the
        # keyword parameters of fiona.open.
        with fiona.open("centroids.gpkg", "w", **profile) as dst:

            # Process only the feature records intersecting a box.
            for feat in src.filter(bbox=(-107.0, 37.0, -105.0, 39.0)):

                # Get the feature's centroid.
                centroid_shp = shape(feat.geometry).centroid
                new_geom = Geometry.from_dict(centroid_shp)

                # Write the feature out.
                dst.write(
                    Feature(geometry=new_geom, properties=f.properties)
                )

        # The destination's contents are flushed to disk and the file is
        # closed when its with block ends. This effectively
        # executes ``dst.flush(); dst.close()``.

CLI Usage
=========

Fiona's command line interface, named "fio", is documented at `docs/cli.rst
`__. The CLI has a
number of different commands. Its ``fio cat`` command streams GeoJSON features
from any dataset.

.. code-block:: console

    $ fio cat --compact tests/data/coutwildrnp.shp | jq -c '.'
    {"geometry":{"coordinates":[[[-111.73527526855469,41.995094299316406],...]]}}
    ...

Documentation
=============

For more details about this project, please see:

* Fiona `home page `__
* `Docs and manual `__
* `Examples `__
* Main `user discussion group `__
* `Developers discussion group `__

Owner

  • Name: Toblerity
  • Login: Toblerity
  • Kind: organization
  • Location: The internet

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this software using these metadata."
type: software
title: Fiona
version: "1.10.0"
date-released: "2024-09-03"
abstract: "Fiona streams simple feature data to and from GIS formats like GeoPackage and Shapefile."
keywords:
  - cartography
  - GIS
  - OGR
repository-artifact: https://pypi.org/project/Fiona
repository-code: https://github.com/Toblerity/Fiona
license: "BSD-3-Clause"
authors:
  - given-names: Sean
    family-names: Gillies
    alias: sgillies
    orcid: https://orcid.org/0000-0002-8401-9184
  - given-names: René
    family-names: Buffat
    alias: rbuffat
    orcid: https://orcid.org/0000-0002-9836-3314
  - given-names: Joshua
    family-names: Arnott
    alias: snorfalorpagus
  - given-names: Mike W.
    family-names: Taves
    alias: mwtoews
    orcid: https://orcid.org/0000-0003-3657-7963
  - given-names: Kevin
    family-names: Wurster
    alias: geowurster
    orcid: https://orcid.org/0000-0001-9044-0832
  - given-names: Alan D.
    family-names: Snow
    alias: snowman2
    orcid: https://orcid.org/0000-0002-7333-3100
  - given-names: Micah
    family-names: Cochran
    alias: micahcochran
  - given-names: Elliott
    family-names: Sales de Andrade
    alias: QuLogic
    orcid: https://orcid.org/0000-0001-7310-8942
  - given-names: Matthew
    family-names: Perry
    alias: perrygeo

GitHub Events

Total
  • Issues event: 13
  • Watch event: 44
  • Delete event: 15
  • Issue comment event: 27
  • Push event: 24
  • Pull request review comment event: 3
  • Pull request review event: 13
  • Pull request event: 46
  • Fork event: 9
  • Create event: 16
Last Year
  • Issues event: 13
  • Watch event: 44
  • Delete event: 15
  • Issue comment event: 27
  • Push event: 24
  • Pull request review comment event: 3
  • Pull request review event: 13
  • Pull request event: 46
  • Fork event: 9
  • Create event: 16

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 1,325
  • Total Committers: 78
  • Avg Commits per committer: 16.987
  • Development Distribution Score (DDS): 0.422
Past Year
  • Commits: 34
  • Committers: 10
  • Avg Commits per committer: 3.4
  • Development Distribution Score (DDS): 0.647
Top Committers
Name Email Commits
Sean Gillies s****s@g****m 766
René Buffat b****t@g****m 177
Joshua Arnott j****h@s****t 51
dependabot[bot] 4****] 42
Mike Taves m****s@g****m 40
Kevin Wurster w****k@g****m 38
Alan D. Snow a****1@g****m 25
Micah Cochran m****h@m****t 18
Elliott Sales de Andrade q****t@g****m 16
Hannes Gräuler h****e@u****e 11
Matthew Perry p****o@g****m 10
Kelsey Jordahl k****l@e****m 7
Ryan Grout g****r 7
Patrick Young p****g@g****m 7
Bas Couwenberg s****c@x****l 7
Ewout ter Hoeven E****n@s****l 6
Sean Gillies s****s@S****l 6
Simon Norris s****s@h****a 5
Joris Van den Bossche j****e@g****m 4
Johan Van de Wauw j****w@g****m 4
Michael Weisman m****n@g****m 4
lgolston 3****n 2
fredj f****d@c****m 2
daryl herzmann a****z@i****u 2
Tim Tröndle t****e@u****h 2
Stefan Brand S****d 2
Sid Kapur s****p 2
Reuben Fletcher-Costin r****n@g****m 2
Miro Hrončok m****o@h****z 2
Loïc Dutrieux l****x@g****m 2
and 48 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 144
  • Total pull requests: 183
  • Average time to close issues: 8 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 89
  • Total pull request authors: 26
  • Average comments per issue: 3.26
  • Average comments per pull request: 0.58
  • Merged pull requests: 141
  • Bot issues: 0
  • Bot pull requests: 65
Past Year
  • Issues: 19
  • Pull requests: 46
  • Average time to close issues: 7 days
  • Average time to close pull requests: 6 days
  • Issue authors: 18
  • Pull request authors: 11
  • Average comments per issue: 1.74
  • Average comments per pull request: 0.48
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 23
Top Authors
Issue Authors
  • sgillies (33)
  • rbuffat (5)
  • mwtoews (5)
  • kloczek (4)
  • snorfalorpagus (3)
  • loicdtx (3)
  • jorisvandenbossche (2)
  • dazza-codes (2)
  • adamjstewart (2)
  • bartoli (2)
  • grwhumphries (2)
  • stretch4x4 (2)
  • veenstrajelmer (1)
  • luiscamachopt (1)
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (111)
  • sgillies (98)
  • EwoutH (9)
  • mwtoews (7)
  • sebastic (5)
  • rbuffat (5)
  • QuLogic (5)
  • groutr (5)
  • a-detiste (3)
  • adriantre (2)
  • jelly (2)
  • shenriotpro (2)
  • akrherz (2)
  • bmwiedemann (2)
  • paulschreiber (2)
Top Labels
Issue Labels
bug (32) wontfix (16) upstream (10) enhancement (9) docs (9) release (6) packaging (6) invalid (5) resolved (5) build (4) needs discussion (2) duplicate (2) security (2) tests (2) decision (1) intermediate (1) automation (1) deprecation (1) dependencies (1) schema (1)
Pull Request Labels
dependencies (111) github_actions (49) bug (40) python (19) enhancement (7) release (6) docs (4) refactor (4) tests (2) security (2) build (2) backport-to-1.10 (2) packaging (1) driver:parquet (1)

Packages

  • Total packages: 17
  • Total downloads:
    • pypi 4,889,286 last-month
  • Total docker downloads: 63,355
  • Total dependent packages: 260
    (may contain duplicates)
  • Total dependent repositories: 2,771
    (may contain duplicates)
  • Total versions: 215
  • Total maintainers: 5
  • Total advisories: 2
pypi.org: fiona

Fiona reads and writes spatial data files

  • Versions: 121
  • Dependent Packages: 198
  • Dependent Repositories: 1,901
  • Downloads: 4,889,286 Last month
  • Docker Downloads: 63,355
Rankings
Downloads: 0.1%
Dependent packages count: 0.1%
Dependent repos count: 0.3%
Average: 1.2%
Docker downloads count: 1.3%
Stargazers count: 1.9%
Forks count: 3.6%
Maintainers (2)
Last synced: 4 months ago
alpine-v3.18: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 3.7%
Forks count: 6.9%
Stargazers count: 7.7%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.18: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 3.7%
Forks count: 6.9%
Stargazers count: 7.8%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: fiona
  • Versions: 34
  • Dependent Packages: 53
  • Dependent Repositories: 435
Rankings
Dependent repos count: 1.4%
Dependent packages count: 1.4%
Average: 7.0%
Stargazers count: 12.4%
Forks count: 12.7%
Last synced: 4 months ago
alpine-edge: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.1%
Dependent packages count: 14.3%
Maintainers (1)
Last synced: 4 months ago
spack.io: py-fiona

Fiona reads and writes spatial data files.

  • Versions: 6
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 7.0%
Average: 7.1%
Stargazers count: 7.4%
Dependent packages count: 14.2%
Maintainers (1)
Last synced: 4 months ago
alpine-edge: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 7.9%
Average: 7.9%
Stargazers count: 9.1%
Dependent packages count: 14.6%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.17: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 6.7%
Stargazers count: 7.5%
Average: 10.4%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 4 months ago
anaconda.org: fiona

Fiona reads and writes geographic data files and thereby helps Python programmers integrate geographic information systems with other computer systems. Fiona contains extension modules that link the Geospatial Data Abstraction Library (GDAL).

  • Versions: 9
  • Dependent Packages: 6
  • Dependent Repositories: 435
Rankings
Dependent packages count: 5.1%
Dependent repos count: 8.2%
Average: 14.9%
Forks count: 23.0%
Stargazers count: 23.3%
Last synced: 4 months ago
alpine-v3.21: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.22: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.22: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.21: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.20: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.19: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago
alpine-v3.19: py3-fiona-pyc

Precompiled Python bytecode for py3-fiona

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 4 months ago
alpine-v3.20: py3-fiona

Fiona reads and writes geographical data files

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/rstcheck.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
requirements-ci.txt pypi
  • coveralls *
requirements-dev.txt pypi
  • boto3 >=1.3.1 development
  • coverage * development
  • cython * development
  • pytest * development
  • pytest-cov * development
  • pytz ==2022.6 development
  • wheel * development
requirements.txt pypi
  • attrs >=19.2.0
  • certifi *
  • click *
  • click-plugins *
  • cligj >=0.5.0
  • munch >=2.3.2
  • setuptools >=61.0
ci/rstcheck/requirements.in pypi
  • rstcheck ==6.1.2
ci/rstcheck/requirements.txt pypi
  • alabaster ==0.7.13
  • babel ==2.12.1
  • certifi ==2022.12.7
  • charset-normalizer ==3.1.0
  • click ==8.1.3
  • colorama ==0.4.6
  • commonmark ==0.9.1
  • docutils ==0.19
  • idna ==3.4
  • imagesize ==1.4.1
  • jinja2 ==3.1.2
  • markupsafe ==2.1.2
  • packaging ==23.0
  • pydantic ==1.10.6
  • pygments ==2.14.0
  • requests ==2.31.0
  • rich ==12.6.0
  • rstcheck ==6.1.2
  • rstcheck-core ==1.0.3
  • shellingham ==1.5.0.post1
  • snowballstemmer ==2.2.0
  • sphinx ==6.1.3
  • sphinxcontrib-applehelp ==1.0.4
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • typer ==0.7.0
  • types-docutils ==0.19.1.6
  • typing-extensions ==4.5.0
  • urllib3 ==1.26.15
pyproject.toml pypi
  • attrs >=19.2.0
  • certifi *
  • click ~=8.0
  • click-plugins >=1.0
  • cligj >=0.5
  • importlib-metadata python_version<"3.10"
  • six *
.github/workflows/test_gdal_latest.yml actions
  • actions/checkout v4 composite
.github/workflows/tests.yml actions
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • s-weigand/setup-conda v1 composite
setup.py pypi
environment.yml conda
  • cython 3.*
  • libgdal 3.4.*
  • pip
  • python 3.9.*
  • sphinx-click
  • sphinx-rtd-theme