4

I use the python module "shapely" to make Polygons (like below). Can I convert the sharp edges of a polygon easily to round edges? Such that when I have unified some polygons I could issue a command like

make_round_edges(polygon, edge_rounding_radius) 

? enter image description here

4

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.

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.