Re: Is Fiona just a neat and nimble (and Pythonic) wrapper for GDAL, or does it contain non GDAL-functionality?

Sean Gillies


Thanks for your questions!

On Thu, Sep 8, 2022 at 9:45 AM Mads Skjern <mrvelle@...> wrote:
Your documentation says (

Fiona contains extension modules that link the Geospatial Data Abstraction Library (GDAL)

Does that mean that all the heavy and mathy calculations are  done in the referenced GDAL library, and Fiona is only a more Pythonic wrapper?
Does it mean that some of the calculations are implemented as part of Fiona, but some functionalities rely entirely on calling GDAL?

The latter. All data format details, geometry operations, cartographic transformations are performed by GDAL functions. But Fiona has its own C extension code, too. Geometry and Feature factories, for example.

Does it mean that the most essential functionalities are implemented in Fiona, but if needed it does contain a number of extensions that one can choose to use, and these extensions call GDAL?

No, Fiona relies on the OGR (GDAL) API when possible. Except in places like Feature factories, which have custom C code instead of, for example,  making a GeoJSON structure and asking GDAL to deserialize it.

Does it have other extension modules that rely on other things than GDAL?

Fiona doesn't directly link other libraries like, for example, GEOS or PROJ. It uses GDAL's OSR* functions to work with spatial reference systems and OGR_G* functions to operate on geometries.

Join to automatically receive all group messages.