I'm trying to make polygons from a line track recorded by a GPS in order to get a rough area that the line was made in. I would like to keep most of the outer edge outline except where it is within a certain distance from itself.

Minimum bounding with the convex hull is simply too aggressive, I'm looking for something more like "delete holes" except it needs to work with holes that are open-ended. I start with a long and skinny buffered track. This is an example of what I start with

I then use "delete holes" to fill in the gaps. Deleted Holes

Then this is what I would like the end product to look like, which I was only able to do by manually deleting some points and rearranging others. End Product

This is what it looks like using a convex hull but I would like to keep those top and bottom curves, as well as slight indents on the sides. Convex Hull

I have tried using smooth polygons as well but the curvatures are way too small to make any difference.


Using Menu Processing / Toolbox / Concave hull (k-nearest neighbor) (see documentation Concave hull k-nearest neighbor), this is what you get (see screenshot below: red hached polygon) for the blue input polygon, using a value of 80 for Number of neighboring points to consider. Change this value to adapt the shape:

a lower number is more concave, a higher number is smoother

As this algorithm is based on the number of vertices, if changing this number does not produce good results, than changing the number of vertices might be an option. Either use Densify (see documentation) to create more vertices or Simplify (see documentation) to reduce the number of vertices.

enter image description here

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.