# Original polygon is completely contained by new after simplifying

Is there a polygon simplification method that can create a polygon, such that the original is completely contained by the new one?

The aim is to create the new polygon from as few points as possible while maintaining a specified maximum tolerance. Until now I have been using a method that creates a buffer to a distance of specified tolerance and then uses a regular simplification method but that seems to be very inefficient as it sometimes creates an unnecessary offset. The original does not intersect itself.

My desired output looks as following

• Maybe simplification and adding a buffer would be another method you should consider Sep 6, 2019 at 6:00
• @BERA convex hull does not account for tolerance. Also it does not simplify the polygon if its already convex Sep 6, 2019 at 6:10
• @babel You mean switching the steps of the procedure I have been using? The problem is the same - it creates an unnecessary offset. Sep 6, 2019 at 6:12
• Maybe it would be useful to have a screenshot or the vector-file to see what exactly you want to do. You want to simplify, that also means: changing the geometry, am I right? So dropping vertices, something like here: upload.wikimedia.org/wikipedia/commons/9/91/Douglas_Peucker.png If you still want your original polygon to be completely covered by the simplified one - how should this be possible without an offset? Sep 6, 2019 at 6:21
• @babel you are correct, but I don't need the simplified polygon to use the vertices of the original. Sep 6, 2019 at 6:31

Simplify your original polygon first. Than use the offset curves tool (from advanced digitizing toolbox - activate it if not visible) to enlarge the simplified polygon. Activate the snapping-mode and make sure that the enlarged polygon snaps to the point on your original polygon that is farthest away from your simplified one (to avoid unnecessary offset).

If offset curves produces round angles configure the parameters in QGIS options dialogue

See screenshot:

• Thank you for your solution to the problem. There is however still too much space between the new border and the old one. Sep 6, 2019 at 9:01
• Than use a less radical simplify-parameter - the more you simplify, the more different the two polygons will be - the more space you have between old and new border. Simplify without border would mean just to get back to your old polygon - and a more radical simplification (in the extreme case: just a triangle) means a lot of space in between. Optimal settings by trial and error, I guess - or do you have a clerly-defined amount of space that is allowed to be left? Sep 6, 2019 at 12:10
• I don't have a spacific reqirement for the amount of space to be between the two borders, I just see that in your example I could make it smaller without adding any points. Sep 6, 2019 at 13:01
• I don't see how you could do this automatically - if you simplify the geometry, you will always have some space left. Only way to reduce this space is to to reduce the amount of simplification (adjust the parameter in the simplification), so the line will be closer to the original polygon. Of course, you could manually adjust the result, but that's not what you want, I guess. Sep 6, 2019 at 13:39

Code to do exactly this is now available in the JTS Topology Suite. It is in the `PolygonHull` class. It supports both Outer and Inner hulls. The control parameterization is either fraction of vertices in result or ratio of change in area.

See the PR.