2

Can anyone suggest a QGIS/R approach to sample from a polygon n points that satisfy some conditions depending on underlying raster layers values?

E.g. I have a country polygon and I would like to sample 10 points such that for those points the population density (density_raster) is>100 and altitude (altitude_raster) is <1000.

asked Mar 26, 2018 at 10:28

1 Answer 1

3

In QGIS:

Use the Raster Calculator to create a raster that is equal to 1 anywhere the population density > 1000 condition is satisfied and where the altitude raster's condition (< 1000) is also satisfied.

Polygonize the output raster. Use a definition query on the result to only show the areas with a value of 1. This area is now a polygon representation of the areas where both of your conditions are satisfied.

Now use Vector> Research Tool> Random Points Inside Polygons with your intersected polygons and specify whatever other parameters you deem appropriate.

answered Mar 26, 2018 at 11:42

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.