I'm looking for a tool to generate a stratified random set of points within the boundaries of a polygon layer. In ftools 0.6.1 there is a tool which almost does what I need, but misses the stratified part. For example, I needed to generate 100 random point inside each polygon, accordingly with the polygon's class (from a given field). I know Hawth's Tools had this... Thanks
1 Answer
fTools is still there under the Vector menu. The sampling tool you need is Vector|Research Tools|Random Points.
You need to create a new attribute (like 'points') for your polygon layer; for each stratum, you enter the number of points you need to be generated for that stratum. In the dialog you select that new attribute in the 'value from input field' dropdown.
Update: This only seems to be working in QGIS 1.9, not 1.7.4.
Update 2: If you're using 1.7, this is a known bug but there is a workaround:
- Make sure you have another polygon layer loaded;
- Open the Random Points tool again, and first select a different layer to the one you want to use as the strata boundaries;
- Select the strata boundaries layer, and then you can select the proper field name.
-
-
-
I mean its not in front of my eyes... :) BTW I trying it and i'm not getting any field listed in the dropdown Commented Apr 18, 2012 at 11:15
-
Did you select the radio button next to the "Use value from input field" bit of the dialog? Commented Apr 18, 2012 at 11:17
-