rfshed
A reasonably fast CUDA accelerated viewshed generator. Creates a 12k×12k pixels viewshed image in well under a second on a GTX 1660 GPU. The algorithm used is not perfectly accurate but artifacts are mostly observed in areas of acute sighting angles where vegetation and other factors not well expressed in the DEM may play major role in visibility.
Requirements
Install Go and CUDA to build.
To run it you will have to provide the 3″ ("90m") SRTM .hgt files.
Build
make
Run
LD_LIBRARY_PATH=. ./rfshed
Arguments
-h prints help
-lat latitude (decimal degrees)
-lon longitude (decimal degrees)
-hgtdir path to .hgt files
-ah observer height (meters above terrain)
-bh target/receiver height (meters above terrain)
-cutoff radius (meters)
-z Web Mercator zoom level
-rr factor to simulate refraction by adjusting Earth curvature by the factor specified
-rt degrees Celsius to estimate refraction using a specified temperature at the observation point
-outfile name where to save the resulting png file
All arguments are optional, with none provided a 200km Everest viewshed is generated to out.png.
Result
Viewshed is generated in a Web Mercator projected monochrome png file.
Try online
The same algorithm is used at sauropod.xyz.