2

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!

Alex
  • 939
  • 15
  • 29

1 Answers1

5

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.

TDavis
  • 1,704
  • 1
  • 15
  • 26
  • But then do I have to manually do the 'random selection within subset'for each class? because it seems it does it only for one class at a time – Alex Feb 04 '14 at 02:50
  • As far as I can see from the documentation and tool format, it should be generating points for every unique id in the selected field. you should make sure each feature have a unique value, and not use a value shared by multiple polygons. either that, or you have a polygon selected and it is only running on already selected features – TDavis Feb 04 '14 at 13:55