I would like to know how to create an X number of random points in each grid cell.
I'm using data from a DEM layer, which contains information about elevation. I used this information to obtain slope and aspect. Then I created a grid (each cell with 1000 units size) with the objective of randomly sampling each cell (with one, two points, doesn't matter) so I could obtain an average value of slope and aspect for each location (location = grid cell).
Best Answer
If you write Random in the
Processing toolbox
, you will find that there are many Random Points inside polygon tools exist in QGIS as you can see below:You can test which one will fit your needs either
Random Points inside Polygon (Fixed)
orRandom Points inside Polygon (Variable)
.Example:
Using
Random Points inside Polygon (Fixed)
, you need to specify the number of points: 2 as you want. For minimum distance I put 0.001 in this example, but you can put also Zero (0) and it should work.Here is the result: