Stratified random sampling in QGIS

In my previous post I described how you can create a random stratified sampling using GRASS GIS. Unlike in GRASS GIS however, QGIS has a dedicated tool to do this. You can find it under ‘research tools’ in ‘Vector’ menu. In the image below, you see a map of the main administrative units of Ethiopia. In each unit, I want to sample 100 points. This can be done with the ‘Random points’ tool.

Quantum GIS exported_002

Opening the tool will give you a menu where you have the option to define the number of random points and whether to use a stratified or normal sampling design. You can select a fixed number of points per strata (each polygon is a strata), or a fixed density. A third option is to use the value in a column in your attribute table to determine the number of sample points.

The 'Random points' menu. You can opt for a unstratified or stratified sampling design

And the image below gives the result, a point layer with 100 random points per polygon.

The map of Ethiopia, with 100 sampling points per administrative unit

All in all easier and more straightforward then the approach I described for GRASS GIS. And the same tool is also available in the Sextante plugin, which means it should be easy to incorporate it in all kind of batch analyses using the Sextante Modeler.

About these ads

6 thoughts on “Stratified random sampling in QGIS

  1. Pingback: Stratified random sampling in GRASS GIS | Ecostudies

    1. pvanb Post author

      Not sure in QGIS, but in GRASS (which you can of course run from QGIS) you have the function r.random.cells, which allows you to set a minimum distance. Another way in GRASS is to set the resolution to the minimum distance using g.region and than use r.random to generate raster point layer.

  2. elena

    ChrisJ, you can randomly select points from a point layer with a distance criteria with the tool “create random points” included in the “data management tools” toolbox.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s