New answers tagged shapely
The simple approach is to loop through each polygon, filter the remaining polygons by the spatial extent of the polygon (plus a little buffer), and then run your adjacency test. If your polygons are going to be of the "Simple Feature" variety, i.e. you aren't using a topological data model, you'll need to consider how you define adjacency in terms of ...
Try polygon.buffer(10, join_style=1).buffer(-10.0, join_style=1) A dilation, rounded (join_style=1), followed by an erosion, rounded. There's a diagram of a similar procedure at http://toblerity.org/shapely/manual.html#object.buffer.
for rounding your convex angles, you can apply successively a negative then a positive buffer of the same radius. For the angles shown on your figure, you are thus applying the method on the blue polygons. the buffer tool in shapely is part of the shapely.geometry package
Top 50 recent answers are included