Toblerity/Fiona — pull request #112 by snorfalorpagus (2014-06-08 21:55:46+00:00)
Title: Provide read access to feature data using FID as an index.

I've added a method for accessing feature data directly using the OGR_L_GetFeature API method, used as follows:

```
with fiona.open('data.shp', 'r') as src:
feature = src[42]
```

This is useful in situations such as when using a spatial index to access features that are spatially close but not stored together, in a memory constrained environment or when working with very large datasets where multiple file reads are preferable to storing all of the layer in memory.

I've added a couple of unit tests, which illustrate the basic usage and also shows it plays nicely with the existing iterator-based access.

Currently __getitem__ will return None if an index that is out of range is passed (e.g. -1) - perhaps it would be more appropriate to raise an IndexError? The method attempts to cast to an integer before calling, so "0" is also valid index, but "zero" is not.