mapbox/rasterio — pull request #67 by brendan-ward (2014-04-03 03:58:26+00:00)
Title: Enable connectivity = 8 option for shapes

This pull request enables additional connectivity option for _shapes in _features.pyx

Includes test case.

Note: geometries are returned as expected, but they are not valid according to Shapely manual:
http://toblerity.org/shapely/manual.html#Polygon

because they include self-intersections.

Perhaps it would be better NOT to enable allow this option even though it is allowed by GDAL?

Alternatively, it may make sense to convert polygons with self-intersections into MultiPolygons instead.