Geoprocessing for humans: close() and with
Fiona 0.8 has a bunch of important new features: file bounds/extents, sync of bounds and record count with writes, protection against iteration restarts, and more:
0.8 (2012-02-21) ---------------- - Replaced .opened attribute with .closed (product of collection() is always opened). Also a __del__() which will close a Collection, but still not to be depended upon. - Added writerecords method. - Added a record buffer and better counting of records in a collection. - Manage one iterator per collection/session. - Added a read-only bounds property.
I've also expanded the manual (still under construction), documenting among other things what Fiona does to keep users from stumbling over external resources: http://toblerity.github.com/fiona/manual.html#closing-files. Don't del
your collections or set them to None
and then sacrifice a chicken while crossing your fingers and hoping for the best – just call close()
or use with
and enjoy some peace of mind.
Update (2012-02-22): "layers" (as in OGR) in the last sentence changed to "collections" (as in Fiona).