19

I have an input point layer that is grouped into clusters, so I want to have each cluster of points converted into polygon.

This question How to convert a set of points to a polygon based on a specific field in QGIS (this question was removed) seems to come close to what I wanted by it hasn't been answered.

So basically, I need an algorithm in QGIS that will convert each cluster of points (based on attribute field) as seen below into a polygons?

enter image description here

I have tried "Point2One" plugin and it gave me wrong result seen below...

enter image description here

A copy of my data is found here.

Taras
  • 32,823
  • 4
  • 66
  • 137
Umar Yusuf
  • 748
  • 1
  • 5
  • 15

2 Answers2

21

Convex hull - as mentioned by Kazuhito - is one option, but - depending on the cluster shape - you will get more appropriate polygons using concave hulls, for example implemented in ConcaveHull plugin.

enter image description here

underdark
  • 84,148
  • 21
  • 231
  • 413
10

You may be interested in Convex Hull which is in Processing | QGIS geoalgorithms | Vector geometry tools. There is Field option which can be used with Method Create convex hulls based on field.

enter image description here

Or from the menu Vector | Geoprocessing Tools | Convex Hull(s).

Many Thanks, Techie_Gus and underdark for information.

Kazuhito
  • 30,746
  • 5
  • 69
  • 149
  • 1
    Note that in the latest QGIS release, i.e. 2.18, the Geoprocessing Tools menu is no longer under the Vector menu. It is now only accessible through the processing toolbox. – Techie_Gus Feb 26 '17 at 11:39
  • 3
    @Techie_Gus If you don't see a Geoprocessing Tools menu, that's a sign that you have an old Processing version in your plugin folder that should be deleted – underdark Feb 26 '17 at 17:45
  • Thanks @underdark. I will add drop-down list of 2.14/2.18 cases for clarity. – Kazuhito Feb 26 '17 at 18:17
  • @underdark I can see the processing tools menu as a separate menu but not under the vectors menu anymore. And by the way, I use the OSGEO4W installer. – Techie_Gus Feb 26 '17 at 18:20
  • What to do with polygons that overlap each other? – Frodo Feb 27 '17 at 06:20
  • @nagib Could you expound your comment? – Kazuhito Feb 27 '17 at 08:06
  • Thanks to @underdark my Processing is now working as it is supposed to be, and the different geoprocessing tools are now under the Vector menu! Indeed there was a processing folder in the plugins folder under c:\users and another entry under C:\OSGeo4W64. This essentially invalidates my first comment and consequently, an OSGeo4W installation should be no different than a standalone installation (at least in this context). – Techie_Gus Feb 27 '17 at 08:53
  • @Techie_Gus Thanks for your follow-up and feed back information. Edited the answer accordingly. (and Glad to know your Vector menu is good now, too.) – Kazuhito Feb 27 '17 at 09:27
  • @Kazuhito The picture in the response shows the polygons that overlap. Is this a problem for you? – Frodo Feb 27 '17 at 13:38
  • Thanks @nagib. To me it indicates interspersed distribution of this attribute. Overlaps occur in both convex and concave hulls (as OP needs control by attribute field). But it can be problematic for OP. – Kazuhito Feb 27 '17 at 13:53