1

I'm trying to avoid/simplify the following manual process intended to create a polygons layer with exactly n polygons so that each polygon encloses the same or close to the same number of points in an existing points layer:

  1. Select the approximately correct number of points and create a convex hull n times to match the required number of polygons.
  2. Use v.clean\rmdupl to create separate polygons for overlapping areas.
  3. Use Eliminate Sliver Polygon to get touching but not overlapping coverage with n polygons.
  4. Use Points in Polygon to determine if the distribution is close to equal.
  5. Manually move polygon boundaries and rerun the counts as many times as needed to arrive at the solution.

The polygons do not need to be regularly shaped.

  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq. – underdark Feb 1 '18 at 20:24
  • Is it ok if the points are exactly equally distributed between them, or is some variation preferred? – JoshC Feb 2 '18 at 0:20
  • Exactly equal or close to it is actually preferred. – equalx Feb 2 '18 at 15:19
  • I'm really not sure how to clarify my question. There is a points layer. I want to create a polygons layer with exactly n polygons so that each polygon encloses the same or close to the same number of points. The polygons should cover the area seamlessly. – equalx Feb 2 '18 at 16:38
0
  1. Create n random points within your desired area using one of the tools under Vector > Research Tools.

  2. Use the random points output to create Vronoi polygons, found under Vector > Geomoetry Tools.

Or, if your points layer is already established, just skip to step 2. If you need more than 1 point per area, from there it's a simple matter of selecting and merging polygons, using the Advanced Digitizing Toolbar.

It's not automatic, but starting from a seamless polygon layer will likely be less of a drudgery as compared to the process you describe in your question.

  • I appreciate the suggestion, which I feel would work well for a smaller number of points. In this case, I have over a 1000 of them, so while it's possible to select and merge multiple polygons at once, the resulting point counts are not similar, as the merging is still visual. It's still an improvement of the process! – equalx Feb 2 '18 at 16:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.