I'm using QGIS and would like to know if I can automate generating multiple sets of random points and mean distances?

I have a data set consisting over 600 coordinate points for Mistletoe across Greater London. I've mapped these points onto a map of London's waterways and bodies and then used the distance matrix function to measure the distance of each mistletoe point to its nearest waterways vector node, and then calculated the mean distance from water.

I have then generated a set of random points across the same area and repeated the same process giving me a mean distance from water for the random points.

I'd like to repeat the process generating 10,000 separate sets of random points and perform a distance matrix for each set, and calculate its mean distance from water.

Is it possible to automate this in QGIS?


It sounds like you already have a workflow which provides one solution. I would recommend to create a Processing model of this workflow. You can then call this model 10,000 times using a Python loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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