Wednesday, 14 October 2015

qgis - How to randomly select from existing points within each polygon?


I have a polygon layer (where each feature has a class attribute), and a point layer, and there are at least 10 points within each feature of the polygon. Is there a way to randomly select only "k" points of these 10 points for each feature (class) in QGIS?


select only two of ten points that are within each polygon


Thanks!



Answer



you could use 'join by location' to add the polygon attributes to the corresponding points. then use 'research tools/random selection within subset' to select the right number/percentage of points from each polygon value.


No comments:

Post a Comment