4

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.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jul 29, 2020 at 19:34
2
  • 1
    A spatial join should be an easy workaround. Commented 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. Commented Jul 31, 2020 at 15:27

1 Answer 1

2

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.

answered Jul 29, 2020 at 20:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.