[Qgis-user] Stratified sampling based on polygon ID (vs. individual polyons)
Robert Nuske
rnuske at gwdg.de
Fri Sep 6 04:32:26 PDT 2013
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
More information about the Qgis-user
mailing list