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.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jul 7, 2016 at 21:43
2
  • 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?) Commented Jul 7, 2016 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. Commented Jul 7, 2016 at 22:20

1 Answer 1

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

answered Jul 13, 2016 at 14:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.