Last active
April 14, 2018 20:04
-
-
Save tyler-austin/8f3b6c62d42fd84db178626b0154d5a6 to your computer and use it in GitHub Desktop.
Grass Viewshed calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grass.script as grass | |
grass.run_command('r.viewshed', | |
input='standard.dem', | |
output='viewshed', | |
coordinate=[observer_x, observer_y], | |
obs_elev=1.75, | |
tgt_elev=0.0, | |
memory=4098, | |
overwrite=True, | |
quiet=True | |
) | |
# mask or clip https://automating-gis-processes.github.io/CSC18/lessons/L6/clipping-raster.html | |
# rasterio cookbook https://mapbox.s3.amazonaws.com/playground/perrygeo/rasterio-docs/cookbook.html#generating-a-kmz-from-a-raster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment