[Qgis-user] Stratified sampling based on polygon ID (vs. individual polyons)

Brent Wood pcreso at pcreso.com
Sat Sep 7 13:45:00 PDT 2013


Hi Jonathan, 

NIWA (New Zealand) is funding the development of a random stratified survey sample site generator as a QGIS plugin (based around our specific needs).

We have incorporated a different random number generator (more statistically random) than the default, and it can generate random shoreline transects (off-coast linestrings for shellfish dive surveys, for example) in shoreline strata as well as random points in any polygon strata. Strata are defined as single- or multi-polygons, and each has attributes which include the number of stations/transects to generate in each stratum, as well as the minimum distance between them. Thus the parameters are stratum specific, eg- higher density, or more sampling is supported in higher density strata, as desired.

If you start with strata defined as multiple single polygons sharing a common identifier (we did in one test case), use QGIS to combine them into multipolygons based on the identifier, so this survey tool should meet your needs. 

Marco Hugentobler at Sourcepole is doing the code development for us, amd I'm happy for you to try this out for your purposes if you are interested.

We are also planning to extend the tool to carry out a standard analysis based on the result from surveying/sampling the sites generated by the tool. 

At present we are using a custom version of QGIS with the tool pre-installed, with it's own installer, while testing.

The tool is loosely based around this approach to survey design - but does not support second phase calculations - we already have a tool for that:
http://www.tandfonline.com/doi/abs/10.1080/00288330.1984.9516030#preview

If you are interested in trying this tool  out, please let me know & I'll put up a copy for you to download.

On our to-do list is to run many iterations on a standardised dataset to determine the actual randomness of the results. Essentially combine the outputs & assess the likelihood of any point in each strata being included or excluded - the perfect result being that every point has an equal chance of being sampled. This is more likely with the point samples - shoreline transects are a bit more arbitrary with convoluted coastlines.


Cheers,

  Brent Wood




________________________________
 From: Jonathan Greenberg <jgrn at illinois.edu>
To: rnuske at gwdg.de 
Cc: qgis-user at lists.osgeo.org 
Sent: Sunday, September 8, 2013 7:58 AM
Subject: Re: [Qgis-user] Stratified sampling based on polygon ID (vs. individual polyons)
 

Robert:

Thanks!  Yeah, I ended up being a bit more patient (after your
response) and realized it WAS working, it just took a REALLY long
time.  I found this bug report from 2 years ago:

http://hub.qgis.org/issues/3371 (Random points is terribly slow with
complex features)

which seems to still be unresolved.  I'll check out the internal code
at some point, but I'm not a QGIS developer -- is there anyone out
there that might like to "collaborate" on speeding this up (if I come
up with some algorithm modifications, could someone actually implement
them?)

By the way: this is a non-trivial issue, in my opinion, if someone
wants to do "true" stratified sampling (per-polygon sampling isn't
really stratified in most cases), this tool, applied to a multi-part
polygon, is the only tool I've found that can do this (ArcGIS and
plugins don't seem to work).

--j


On Fri, Sep 6, 2013 at 6:32 AM, Robert Nuske <rnuske at gwdg.de> wrote:
> Hi Jonathan,
>
> the process you described works for me in QGIS 1.8.
>
> After fiddling with your dataset I  reverted to a minimal example of a dozen
> polygons and three groups. After converting the singleparts to multiparts I
> asked for 5 "random points" in "stratified sampling design".  Each multipart
> feature got 5 points and in every multipart the points where spread out across
> all polygons belonging to that multipart.
>
> So I guess its a matter of size.
>
> cheers
>   robert
>
>
> Am Donnerstag, 5. September 2013, 16:09:53 schrieb Jonathan Greenberg:
>> QGISers:
>>
>> I'm trying to realize stratified random sampling using a
>> classification raster that I polygonized.  It seems like the random
>> points tool will create random points within each polygon, but in my
>> case the strata are the classes, which can be scattered across a
>> landscape -- in other words, multiple polygons make up a single strata
>> (I'd argue this is a more valid definition of stratified random
>> sampling).  I'd like to choose, say, 10 random points falling in each
>> group of polygons with a given shared (classification) attribute.  Is
>> there any way to realize this in QGIS?  I tried pre-converting the
>> polygonized classification file to a multi-part polygon, but the
>> random sampling tool froze up when I used this as an input.
>>
>> I dropped the polygon layer (derived from the classification raster) in:
>> https://drive.google.com/folderview?id=0B8Kij67bij_AMmNPakJmT1p4OWc&usp=shar
>> ing
>>
>> The "DN" attribute is the strata I want to use (notice multiple
>> polygons have the same DN).
>>
>> To be clear: I don't want 10 points per polygon, I want 10 points per "DN".
>>
>> Thanks!
>>
>> --jonathan
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user



-- 
Jonathan A. Greenberg, PhD
Assistant Professor
Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 217-300-1924
http://www.geog.illinois.edu/~jgrn/
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130907/fc62428c/attachment.html>


More information about the Qgis-user mailing list