Line-of-sight/intervisibility analysis for climateXchange wind turbines project
- Viewshed analysis: finds lines of sight between Scottish properties and wind turbines, accounting both for terrain and building height.
- Various other data preparation jobs done both in R and Python: see the folders for more details.
This code is provided as-is: it is not an application for viewshed analysis.
The main Java viewshed analysis takes two large sets of points in shapefiles, sticks them on an OS Terrain 5-metre grid raster and spits out a CSV telling you which can see which / how many are in 1km distance bands.
The viewshed analysis is done in two stages:
- Data preparation: see the python/QGIS code that runs in the Scriptrunner plugin. Given a folder-full of OS Terrain 5 DEM data and two point shapefiles, this prepares a load of batch files for the line-of-sight analysis. It breaks the data down into batches based on clustering of observer points. That's defined as 'any observer buffers of 2.75km that dissolve together' (so e.g. it gives discrete windfarms). Target points and raster grids within 15km of that cluster of observer points are then all batched together.
- Line-of-sight analysis: see the Java code. This works with the data from #1 and creates the output CSV. There's some test code in there for comparing to other viewshed analysis programs.
There are also Python scripts for processing the OS Terrain 5 data and a few other jobs - see the folder. Downloading from Digimap gives you a bunch of zips. Stick those all in one folder and these will (a) do the unzipping and (b) extract all the DEM files into one folder so they can be batch processed in #1 above. You'll have to hard-code the directory locations for that. There's a script guide on the Python page.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.