How do I retain polygon feature attributes in random points generated within these polygons using QGIS?

Like Generating random points inside polygons that capture values from multiple attribute fields, I found that QGIS 3.14 "Random Points inside Polygons" tool does not retain any attributes from the polygon features.

  • 1
    A spatial join should be an easy workaround.
    – John
    Jul 30, 2020 at 13:41
  • It would work in some cases but it would not work if there are overlapping bounding geometries used to generate the random points.
    – mbela
    Jul 31, 2020 at 15:27

1 Answer 1


For built-in solution, you need to wait for QGIS 3.16 because of this PR https://github.com/qgis/QGIS/pull/35745 (C++ implementation)

I've already made an addition to existing Python processing script as mentioned in QGIS Random Points in Polygon PRESERVING Attribute Table? for this intent (PS: stop using it when QGIS 3.16 will land). Only useful to avoid waiting.

Your Answer

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

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