How to select random points from an existing point feature layer AND assign a minimum distance for the random points?

1524
5
05-15-2020 11:22 AM
AlexisChavez
New Contributor

This is the link with the python code (script 2) I have been using to select random point features based on counts: https://support.esri.com/en/technical-article/000013141

I need to somehow select the points with a minimum distance. I have tried looking up the python code for the minimum distance code but it hasn't worked out, although I might be doing it wrong since I am not an expert with python.

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

If you are using Pro

https://community.esri.com/people/danretired/blog/2020/05/15/point-tools-for-pro 

there is a point creation tool the ensures a minimum point spacing


... sort of retired...
AlexisChavez
New Contributor

Thanks, but I do not have access to Pro.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I am not completely clear what you are trying to do, i.e., is selecting random points still part of the effort or just finding closet points from selected points?  Anyhow ArcMap has the Generate Near Table—Help | Documentation 

0 Kudos
AlexisChavez
New Contributor

So for example, there are 50 point features in one area. From those 50 points I need to randomly select 20 of them. I can do that with the python script that I linked but I want to assign a minimum distance when getting the random sample. 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I want to assign a minimum distance when getting the random sample.

Are you meaning a minimum distance between selected points?  If so, it is more complex because it isn't really random anymore.  You have to select each random point in sequence making sure it is at least a certain distance from all previously selected points.

0 Kudos