5

I have a shapefile with ~1840 polygons, many of which overlap. I'm trying to find a way to create 1000 random points per polygon, based on polygon ID. I don't see a way to this using the GUI Random points or the Processing tool "Random points inside polygon (fixed)." Both tools will create the random points, however they are not linked to a polygon (meaning when I open the random points attribute table there is one column only with values 1:1.840mil). I've thought of doing a spatial join after creating the random points, but I'm not sure how I would deal with all the points that fall within the overlapping area of the polygons.

  • what do you want to achieve? Do you want to make sure there's an even density of points, even where polygons overlap? (Because overlapping areas will have a higher density of random points?) – Steven Kay Jul 7 '16 at 22:04
  • The polygons are buffers around gps locations of individual birds. Most individuals tend to be located in close proximity of their previous location, hence the overlapping polygons. My desired end result is to use the random points to sample landcover types and calculate proportions of each cover-type within the buffer. Make sense? My initial tactic was to create random points at a given density within each buffer, but that failed for some reason. I still would be dealing with the current issue though. – Scolopax Jul 7 '16 at 22:20
2

I have found that the Random Points tool will deal with each polygon one at a time. So every group of 1000 points will only be associated with 1 polygon. Use "floor(id/1000)" to calculate the id of the polygon that each point is associated with.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.