Code & tools
Forestry Sampling Point Generator
Before a forest survey, the proposed sampling locations need to fit both the study area and the conditions set for fieldwork. I built this tool to narrow the candidate area using three criteria: forest presence, slopes below five degrees and locations within 1,000 metres of a road.
The user supplies the study boundary, vegetation, roads and elevation data, then chooses the number of points to create. The output gives a field team a set of candidate locations to review while keeping the spatial selection rules consistent.
- Slope threshold
- Below 5 degrees
- Road distance
- Within 1,000 metres
- Coordinate system
- WKID 3400
- Tools
- ArcGIS Pro, ArcPy, Spatial Analyst, Python
Choosing candidate sampling locations
The tool combines three criteria inside the study boundary, then generates random points in the area where all three are met.
Inspect details: Choosing candidate sampling locationsApplying the field planning criteria
I check that the inputs use NAD 1983 10TM AEP Forest, WKID 3400, then buffer the roads and clip the buffer to the study area. I select vegetation polygons with a positive AVI species percentage value and calculate slope from the elevation model.
Raster calculations combine forest presence, slope and road proximity. I convert the suitable cells into one multipart polygon before generating random points, so the requested count applies across the whole candidate area rather than separately to each polygon.
Reading the sampling output
The script checks the final point count and adds the locations to the active map. The points show where all three mapped conditions are satisfied, giving the user a starting set of proposed survey stops and a clear account of how they were selected.
A nearby road does not necessarily provide access, and low mapped slope does not establish safe ground conditions. I would review the points against land access, current conditions and the particular survey design before arranging field visits. The tool prepares candidates; the field programme still determines whether they are suitable.