Having the following information in a CSV file:
I want to build a polygon with all the points where the Group name is the same.
For example I want to join all the points where the group is T101 and form a polygon.
Having the following information in a CSV file:
I want to build a polygon with all the points where the Group name is the same.
For example I want to join all the points where the group is T101 and form a polygon.
Connect the dots method:
Use the Points to path tool to draw a line connecting each set of points. Use your field called "group" for the Group field.
Make sure the points are connected in the correct order, IE going around the outside of the polygon rather than zig-zagging back and forth.
If you have the second case, the next step will create invalid polygons. Go back and create a field you can use to force the points to path tool to join the points in the correct order. If your data doesn't have a convenient way to create this field, this may not be the best method. Try the method below.
Use the Lines to Polygons tool to convert the lines into polygons.
Concave hull method:
Export the point layer, and choose "multipoint" as the geometry type.
Use the select features by value tool to select all points in a group, and merge them into one feature. Repeat for each group.
Run the Concave hull (k-nearest neighbor) tool. This will create a polygon for each multipoint feature. This works best for simple polygons. If your polygons are very complex, it may simplify them. For example:
In that case you would have to manually edit the polygon.
name as a polygon property? I am trying to create a GeoJSON with the polygon layer and I need to have the name as property. I would appreciate your help too much.
– Gibrán
Feb 20 '19 at 15:14