Fiona 0.12

I've tagged 0.12 and uploaded an sdist to PyPI: Changes:

  • Fix broken installation of extension modules (#35).

  • Log CPL errors at their matching Python log levels.

  • Use upper case for encoding names within OGR, lower case in Python.

The 0.11 release was broken and I yanked it, but it had some nice new features and bug fixes, too:

  • Cythonize .pyx files (#34).

  • Work with or around OGR's internal recoding of record data (#35).

  • Fix bug in serialization of int/float PROJ.4 params.

A couple of OS X users who are satisfying Fiona's GDAL requirements with the frameworks from have contacted me about this import error:

>>> import fiona
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kilroy/Desktop/fiona_env/lib/python2.7/site-packages/fiona/", line 70, in <module>
    from fiona.collection import Collection, supported_drivers
  File "/Users/kilroy/Desktop/fiona_env/lib/python2.7/site-packages/fiona/", line 7, in <module>
    from fiona.ogrext import Iterator, Session, WritingSession
ImportError: dlopen(/Users/kilroy/Desktop/fiona_env/lib/python2.7/site-packages/fiona/, 2): Symbol not found: _CPLSetThreadLocalConfigOption
  Referenced from: /Users/kilroy/Desktop/fiona_env/lib/python2.7/site-packages/fiona/
  Expected in: flat namespace
 in /Users/kilroy/Desktop/fiona_env/lib/python2.7/site-packages/fiona/

This is a sign that you need


in your environment, whether that's a virtualenv or set in your .profile.


Re: Fiona 0.12

Author: Martin Laloux

I never had a problem to compile Fiona on Mac OS X with the frameworks from

# First, build the extensions ( and

python build_ext -I/Library/Frameworks/GDAL.framework/Versions/1.9/Headers -L/Library/Frameworks/GDAL.framework/Versions/1.9/unix/lib -lgdal

# install the module

python install

Re: Fiona 0.12

Author: Sean

Martin, those people have succeeded in building the extension modules, but are having dlopen failure at run time. Btw, if /Library/Frameworks/GDAL.framework/Programs is on your path, gdal-info will find the headers and library for you. "pip install Fiona" just works in that case.

Re: Fiona 0.12

Author: Frank

Hi Sean,

I just read your tweet about the python + shapefile Fiona to OGR ratio and that made me wonder if I could substitute my ogr2ogr subprocess stuff with Fiona. Thing is I am reading from a Postgis database and converting mostly to some well known text formats like GeoJSON or KML. But I've only found Fiona examples with Shapefiles. Does Fiona support reading from Postgis? What about SQL? With OGR you can pass in a custom SQL query with the -sql switch which is handy when subselecting stuff.

Anyway I think Fiona and Shapely are great projects.


Re: Fiona 0.12

Author: Sean

No, Fiona doesn't support PostGIS, and that's because there are already plenty of Python database adapter packages. I also think ogr2ogr is a killer program and a great way of converting PostGIS tables to other formats.

Re: Fiona 0.12

Author: Frank

Thanks for the clarification. Though I find it a pity that I cannot try Fiona right now I do very well understand the reasons. I started myself once an attempt to write a more pythonic interface to ogr(2ogr) and you quickly hit the wall, especially when it comes to conversion speed.