I have a polygon shapefile with a single object and I want to create random points in it. The tool 'random points in polygon' in QGIS does it job well for polygon 1, but doesn't create any points for polygon 2 with a 'complexer' shape (even though a point layer is created). Somebody knows what could be the problem?

Data: https://drive.google.com/drive/folders/1hc9pHMdckLk_a0YigP-UseVjcNPkMbk3?usp=sharing


Polygon 2

  • 2
    Your second polygon has a complex shape, not a complex symmetry. Both polygons are in the same layer? Can you share your data for testing?
    – Babel
    Mar 31, 2022 at 7:29
  • Sure, but I'm relativly new to StackExchange. How can I share data?
    – talocodat
    Mar 31, 2022 at 7:35
  • You can't share here. Upload to a cloud or webspace and share the link here (best edit you initial question and post it there).
    – Babel
    Mar 31, 2022 at 7:36
  • 1
    Have you set a "Global minimum distance between points"? Maybe it cant find a solution
    – BERA
    Mar 31, 2022 at 7:53
  • 1
    I have no problem creating random points in polygons, using your data (problematic shapefile). So you should check your settings and post a screeshot of the dialog window of random points in polygons to see what goes on. Something like this: i.stack.imgur.com/ztOgd.png
    – Babel
    Mar 31, 2022 at 10:12

1 Answer 1


I'm not exactly sure what is causing this issue, but I did find a workaround.

If you use the algorithm with the ID 'qgis:randompointsinsidepolygons' instead of 'native:randompointsinsidepolygons' you shouldn't run into this issue. This method seems to have slightly less control, but for most purposes should work fine.

  • 1
    Isn't that the same?
    – Babel
    Mar 31, 2022 at 10:05
  • For me, it showed a different UI for the algorithms, and one worked and one didn't. So I guess not.
    – enor
    Mar 31, 2022 at 11:33

Your Answer

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

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