[GIS] Create random sampling point in each grid’s cell

pointqgisqgis-processingrandomsampling

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).

My current project looks like this

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:

enter image description here

You can test which one will fit your needs either Random Points inside Polygon (Fixed) or Random 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.

enter image description here

Here is the result:

enter image description here