0

The "Random points inside polygons" tool in QGIS works great to generate a fixed number or density of points within polygons; however, because QGIS does not link the polygon ID to the points, when those polygons overlap, there is no way to distinguish among the points. If you are generating a fixed number of points per polygon, here is a hack that works. Unfortunately, if you are generating a density of points in polygons with different areas, this approach does not work as easily. I will simply generate my random points in R from now on, but this seems like a straight forward (and commonly needed) feature. Is there a tool that I am missing?

(I am using QGIS 3.14.16-Pi on Debian Linux and Windows 10)

enter image description here

6
  • You want to be able to tell which point belong to which polygon? There's the option 'INCLUDE_POLYGON_ATTRIBUTES':True you are saying that this does not work for overlapping polygons?
    – BERA
    Nov 20, 2020 at 18:38
  • Where is that option? In the GUI tool, there is no field in which to specify any options. Is there a way to get into the command-line version of this?
    – midden
    Nov 20, 2020 at 18:52
  • Checkbox: imgur.com/a/sB2Eno9
    – BERA
    Nov 20, 2020 at 19:07
  • That is not present on my version of QGIS (tool found in "Vector creation/Random points inside polygons". I have edited the original post to include the tool window. Are you using a plugin tool?
    – midden
    Nov 20, 2020 at 19:18
  • No plugin. You are using the wrong tool. It's called Random points in polygons
    – BERA
    Nov 20, 2020 at 19:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.