Tag Info

New answers tagged

2

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.


3

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


4

The Ogr function GetEnvelope() returns "a tuple (minX, maxX, minY, maxY)" (from here), but what you want (from what I can understand) is a Polygon describing the envelope/bbox? This is actually rather simple, as the tuple (minX, maxX, minY, maxY) is all you need to create a Polygon. Just create a Polygon based these, like so: from osgeo import ogr def ...



Top 50 recent answers are included