Hello everyone,
I have a shapefile of oil discovery locations, and I need to randomly displace each location by a distance between 10 and 20 kilometers. I am looking to perform this task multiple times for analysis purposes.
Could someone please guide me on how to achieve this in ArcGIS Pro? Any detailed steps or scripts that could help automate this process for a large number of iterations would be greatly appreciated.
Thank you!
As you will repeat this process, best to do this in ModelBuilder. I would start with buffering each point by 20-30 km (Dissolve Type = No Dissolve), then create a single random point in this buffer using the Create Spatial Sampling Locations GP tool. Make sure to use the "Stratified by individual polygon" sampling method. Then stipulate that you want 1 sample per polygon.
Then run a Spatial Join to get the details of the oil discovery locations.
Thanks. I have created buffers of 10km and 20km around each point. How do I create a donut shape from these, please?
Secondly, I am getting an error while using the Create Spatial Sampling Locations geoprocessing tool. Can you help with this?
Thanks
You received the above error because you need to the output of your buffer as input into the Create Spatial Sampling Locations tool, not your drill sites.
The workflow I propose can only really work if you don't have overlapping polygons (buffered drill sites).
I misread your first post. To create the doughnuts, you will need to create 2 buffer outputs (10 and 20 km each) and then use the clip tool to clip/remove the smaller buffer. You will be left with a doughnut. This is what you must use as input into the Create Spatial Sampling Locations tool.
You will then create 1 random point within the buffer doughnut. Afterwards, use Add Spatial Join tool with the "Nearest" match option to link up the original drill sites with the new random points to get the attribute data.
Another approach would be to round the coordinates of the points:
Also, once you have the coordinate values in the attribute table, you can use the Calculate Field tool to adjust them other ways than rounding, for example by adding some random positive or negative value within some specific range of values to each feature's x and y coordinates.
I'd go with Python calculations for this, see:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm
What @MervynLotter suggest is a good solution but I just want to add that you could have also used the Create Random Points tool and set the constraining feature class to the buffers.