mapbox/rasterio — pull request #62 by brendan-ward (2014-03-28 22:54:47+00:00)
Title: Add support for rasterizing geometries

This pull request resolves issue 45, enabling export of Fiona style features and geometries to numpy arrays via GDAL.

Provides cython function in _features.pyx that takes geojson geometry strings as input, and uses OGR's CreateGeometryFromJson function go convert those to geometry objects. It then uses those to call GDAL's RasterizeGeometries.

Wrapper functions in features.py allow calling this with either Fiona style features or with geometries, as could be returned by features::shapes(). Allows passing in a value for each feature, or if omitted, simply returns a binary mask.