Good day. Can anybody provide a simple code to be run in the Python Console of QGIS (I am using 1.8 Lisboa) to generate X number of random points (say e.g. 5000) over a certain global shape of polygons (all Vector data). I then need to count the number of points per polygon and calculate the %. All that can be done via GUI but the catch is that I would need to repeat the procedure 100 times, i.e. generate 5000 random points 100 different times and then calculate the mean and standard deviation. Does anybody have a simple code for this (repeating the random generation many times)? Very much appreciated, I´m a total beginner with Python, thanks so much!
Take the 2-minute tour
×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
You should specify more your question. It's unclear what mean by doing a mean and stdev. Here's a sample code you can run in QGIS Python console (still without further iteration):
|
||||
|
You can activate Python plugin "ftools" and do "Random Points..." (from menu Vector > Research Tools). |
|||||
|