Monday 22 July 2019

python - Integrated viewshed analysis


I need to do integrated viewshed analysis of a target with several observer locations. I am going to use r.viewshed analysis function in GRASS. With this function, it is possible to perform analysis based on single observer location. My aim is to add output of each single observer location into integrated viewshed output. Each output, i am going to flag with -b where o denotes non-visible while 1 denotes visible. Through a loop of observer locations, output of viewshed of each location can be integrated with r.mapcalc function. After integration, values = 0 in the rater map dentoes non-visible areas and value >= 1 denotes visible areas. Python code in GRASS for r.viewshed is ok. Under the loop of observer locations how to use r.mapcalc function with each viewshed adding? After getting the integrated viewshed raster, i need to extract its boundary depicting visible area in vector format. How to do that in GRASS? Any idea for this integrated analysis is highly appreciated.


If the integrated output is intoutput, can i use a code like this. in the loop if i=0 -> r.mapcalc 'intoutput = viewshedoutput' if i > 1 -> r.mapcalc 'intoutput = viewshedoutput + intoutput'




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...