QGIS – Creating Polygons from Points with Undefined Order

points-to-linepoints2oneqgisshapefile

I have a point shapefile that contain a batch of features. I want to create polygons from these points. Each point should define a boundary of polygon.

There is an unique "ID" field that group points, but I don't have a order field to connect the points by order.

If I run "Points to line" tool I get some zig-zag lines and I don't want it connected in that way, I want each point to define outer boundary of each polygon. This should be done in QGIS.

I have tried Points2One Plugin but I don't have an order field to run this tool and get what I need.

Best Answer

Let's assume there is a point layer called "end" with it's attribute table, see image below.

input

Points are cotegorized by "class" (in your case they are grouped by the unique "ID" field) and spatially distributed (clustered).

I can suggest using the "Minimum bounding geometry" with 'convex hull' as an enclosing geometry type and grouped by a field.

Creates geometries which enclose the features from an input layer. The features can be grouped by a field. The output layer will then contain one feature per group value with a geometry (MBB) that covers the geometries of the features with matching value.

The result of this algorithm will look like

result_mbg

The same result can be achieved by means of "Concave hull (k-nearest neighbor)"

Generates a concave hull polygon from a set of points. If the input layer is a line or polygon layer, it will use the vertices.

result_chknn

Why not "Concave hull (alpha shapes)" or "Convex hull" algorithm, because they simply do not have a grouping field.


References:

Related Question