generate random points in polygon with minimum distance from one another AND from polygon boundary

3866
9
04-16-2018 05:27 PM
BenjaminRichards
New Contributor II

I am trying to generate a set of random points within a polygon which have a minimum distance from one another AND a minimum distance from the polygon boundary. For example, generate three random points per polygon which are 150m away from each other and which are 75m from the polygon boundary.

I have used the EtGeoWizards tool to do this, but there should be a way to do it within base ArcGIS?

https://www.ian-ko.com/ET_GeoWizards/ETGW12UG_WEB/etgw/randomPointsInPolygons.htm

9 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Producing point patterns with a minimum spacing is not hard (see Point Tools for ArcGIS Pro).

As for the boundary, you could try an interior (negative) buffer of your study area, and snap the code from the toolbox's scripts and iterate it until you get the desired number.  It would be a clip or select by spatial location of the produced pattern... if it is successful then you are laughing.

The toolset uses an extent (rectangle) not an irregular boundary (it is a free tool afterall)

DavidSemitekol4
Occasional Contributor

Hi Dan

Thanks for the free toolset download!  Just a couple of quick questions.  The first is the Extent command doesn't seem to work when selecting a polygon layer in the TOC.  The minimum spacing of points, what unit of measure is this?  I have my workspace projected in the WGS_194_Web Mercator Auxiliary_Sphere projection.

Here is my end goal:

I want to find all areas of population in the state of Wisconsin that have at least 10,000 population in a 10 mile buffer.  After reading your post my theory is this: place random points with a minimum distance of 10 miles in the Wisconsin polygon border.  Create buffers around each point, enrich with population, select buffers that meet population criteria.  Run this analysis 5 times for accuracy.

My original GeoNet Question:

How to determine areas with a minimum population within a minimum distance

The most ideal end goal would be a "heat map" appearance of areas that meet the population and distance criteria.  It's quite the math problem though since I am proposing a moving target of buffer locations.  Essentially I want to tell the computer to drop a point on the map, create a buffer, enrich with population, determine if greater than 10,000.  However, the trick is telling the computer a minimum distance to drop the points next to each other, so it doesn't move the points every 10 feet or something similar.  Your create spaced points tool might just get me close enough, I think!

Thanks.

0 Kudos
BenjaminRichards
New Contributor II

forgot to mention I am working in ArcGIS 10.5

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Ahhh, you would have to recreate the toolbox in ArcMap then... the script(s) should be fine.  But if you have Arc-anything, it also means you have PRO

0 Kudos
AbdullahAnter
Regular Contributor II

You want 75 meter away from polygon boundary to make sure the distance between points over 150 meters (75*2) at all ? or for something else ?

0 Kudos
BenjaminRichards
New Contributor II

For something else. We are creating sampling stations within sampling

polygons in the ocean. This is in the ocean, so there is some drift as the

instruments sink to the bottom. We want to ensure that each point is more

than 75m from the polygon boundary to ensure that the instruments don’t

drift out of the polygon as they sink to the bottom.

0 Kudos
XanderBakker
Esri Esteemed Contributor

You might be able to tweak the script provided here to match your requirements: 

https://community.esri.com/message/473143?commentID=473143#comment-473143 

0 Kudos
AbdullahAnter
Regular Contributor II

There is a work around for this:

1- create Buffer layer use ( -75 meter) as buffer distance, that will shrink your polygons.

2- Create Extent polygon ( one big polygon),use Dissolve tool If all polygons are touched each other or use Minimum Bounding Geometry for separated polygons

3-  Use Create Random Points tool as the following picture and in same order of steps :

Define the output path. before anything . Then :

Select Polygons boundaries layer (shrink layer) ,then specifying  the field that hold numbers of points for each polygon, then write the distance ( 150 meters ). then clear the extent and select the big extent polygon layer.

 

I tried it once before and it worked . I hope it works with you.

thanks

BenjaminRichards
New Contributor II

Aloha Abdullah Anter

Thanks, that's a good work-around. I used the Create Random Points tool with a -75m buffered polygon.  The tool completes without throwing any error messages.  However, even though there is plenty of room to create 3 points per polygon with 75m minimum separation, upon inspection, I find that several polygons contain only 2 points.

I don't know if this will work, my polygon layer can be found here...

https://drive.google.com/drive/folders/14n9hYCHQbqeRGaU03HqeXCLe0OrFyesA?usp=sharing 

0 Kudos