<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hi Jonathan, <br><br>NIWA (New Zealand) is funding the development of a random stratified survey sample site generator as a QGIS plugin (based around our specific needs).<br><br>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.<br><br>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. <br><br>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.<br><br>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. <br><br>At present we are using a custom version of QGIS with the tool pre-installed, with it's own installer, while testing.<br><br>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:<br><a href="http://www.tandfonline.com/doi/abs/10.1080/00288330.1984.9516030#preview">http://www.tandfonline.com/doi/abs/10.1080/00288330.1984.9516030#preview</a><br><br>If you are
interested in trying this tool out, please let me know & I'll put up a copy for you to download.<br><br>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.<br><br><br>Cheers,<br><br> Brent Wood<br><div><span><br></span></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Jonathan Greenberg
<jgrn@illinois.edu><br> <b><span style="font-weight: bold;">To:</span></b> rnuske@gwdg.de <br><b><span style="font-weight: bold;">Cc:</span></b> qgis-user@lists.osgeo.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, September 8, 2013 7:58 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Qgis-user] Stratified sampling based on polygon ID (vs. individual polyons)<br> </font> </div> <div class="y_msg_container"><br>Robert:<br><br>Thanks! Yeah, I ended up being a bit more patient (after your<br>response) and realized it WAS working, it just took a REALLY long<br>time. I found this bug report from 2 years ago:<br><br><a href="http://hub.qgis.org/issues/3371" target="_blank">http://hub.qgis.org/issues/3371 </a>(Random points is terribly slow with<br>complex features)<br><br>which seems to still be unresolved. I'll check out the internal code<br>at some point, but I'm not a QGIS developer -- is
there anyone out<br>there that might like to "collaborate" on speeding this up (if I come<br>up with some algorithm modifications, could someone actually implement<br>them?)<br><br>By the way: this is a non-trivial issue, in my opinion, if someone<br>wants to do "true" stratified sampling (per-polygon sampling isn't<br>really stratified in most cases), this tool, applied to a multi-part<br>polygon, is the only tool I've found that can do this (ArcGIS and<br>plugins don't seem to work).<br><br>--j<br><br><br>On Fri, Sep 6, 2013 at 6:32 AM, Robert Nuske <<a ymailto="mailto:rnuske@gwdg.de" href="mailto:rnuske@gwdg.de">rnuske@gwdg.de</a>> wrote:<br>> Hi Jonathan,<br>><br>> the process you described works for me in QGIS 1.8.<br>><br>> After fiddling with your dataset I reverted to a minimal example of a dozen<br>> polygons and three groups. After converting the singleparts to multiparts I<br>> asked for 5 "random points" in
"stratified sampling design". Each multipart<br>> feature got 5 points and in every multipart the points where spread out across<br>> all polygons belonging to that multipart.<br>><br>> So I guess its a matter of size.<br>><br>> cheers<br>> robert<br>><br>><br>> Am Donnerstag, 5. September 2013, 16:09:53 schrieb Jonathan Greenberg:<br>>> QGISers:<br>>><br>>> I'm trying to realize stratified random sampling using a<br>>> classification raster that I polygonized. It seems like the random<br>>> points tool will create random points within each polygon, but in my<br>>> case the strata are the classes, which can be scattered across a<br>>> landscape -- in other words, multiple polygons make up a single strata<br>>> (I'd argue this is a more valid definition of stratified random<br>>> sampling). I'd like to choose, say, 10 random points falling in
each<br>>> group of polygons with a given shared (classification) attribute. Is<br>>> there any way to realize this in QGIS? I tried pre-converting the<br>>> polygonized classification file to a multi-part polygon, but the<br>>> random sampling tool froze up when I used this as an input.<br>>><br>>> I dropped the polygon layer (derived from the classification raster) in:<br>>> <a href="https://drive.google.com/folderview?id=0B8Kij67bij_AMmNPakJmT1p4OWc&usp=shar" target="_blank">https://drive.google.com/folderview?id=0B8Kij67bij_AMmNPakJmT1p4OWc&usp=shar</a><br>>> ing<br>>><br>>> The "DN" attribute is the strata I want to use (notice multiple<br>>> polygons have the same DN).<br>>><br>>> To be clear: I don't want 10 points per polygon, I want 10 points per "DN".<br>>><br>>> Thanks!<br>>><br>>> --jonathan<br>>
_______________________________________________<br>> Qgis-user mailing list<br>> <a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br><br><br>-- <br>Jonathan A. Greenberg, PhD<br>Assistant Professor<br>Global Environmental Analysis and Remote Sensing (GEARS) Laboratory<br>Department of Geography and Geographic Information Science<br>University of Illinois at Urbana-Champaign<br>607 South Mathews Avenue, MC 150<br>Urbana, IL 61801<br>Phone: 217-300-1924<br><a href="http://www.geog.illinois.edu/~jgrn/" target="_blank">http://www.geog.illinois.edu/~jgrn/</a><br>AIM: jgrn307, MSN: <a ymailto="mailto:jgrn307@hotmail.com" href="mailto:jgrn307@hotmail.com">jgrn307@hotmail.com</a>, Gchat: jgrn307, Skype:
jgrn3007<br>_______________________________________________<br>Qgis-user mailing list<br><a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br><br></div> </div> </div> </div></body></html>