OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
849 stars 309 forks source link

calculate height visibility #2509

Open Frankd66 opened 2 years ago

Frankd66 commented 2 years ago

Hello,

Context I'm working on windturbine visibility. I need to know the height visible of this tall generator from a wide area (about 40km radius with 5-25m resolution). So i use r.viewshed function in python scripts that iterate from 0 to top every meter (for example 200 viewshed for 200m tall) and make r.serie to get the sum of visible meters. I do this operation on all windturbine located on the area, some times about 500 ou 600. So 100 000 viewshed are needed.. so it takes a very long time to be calculated...

Describe the solution you'd like A solution could be the difference of angle between the top and the visible bottom of windturbine: First, calculate the angle from all cells to the top of the turbine. Second, calculate the "r.horizon" in direction of the turbine, and then calculate the difference. Convert this angle in vertical height in meter. No need to calculate all viewshed This approch could be possible by improve r.horizon with the possibility to target on a specific point (x,y) from a specific height above the cell. This also could be an improvement on r.viewshed to treat not only a point, but a height of visibility. This is may be possible if r.viewshed returns the necessary height of the observer (point) to make visible the target (cells).

Describe alternatives you've considered Brut force by iteration with r.viewshed (what I'm already doing with a 64proc Rysen)

Additional context My need is not only the visible height, but also the unvisible height. Both in meter and degrees. The refraction should be used. As a professional need, we can participate at the development cost

Thank you for your attention.

Cheers, Frank DAVID

ninsbl commented 2 years ago

Maybe this: https://grass.osgeo.org/grass82/manuals/addons/r.viewshed.exposure.html or this: https://grass.osgeo.org/grass82/manuals/addons/r.survey.html could be of use?

Frankd66 commented 2 years ago

Hi Stephan. Thank you for your proposal. r.viewshed.exposure seems to calculate soil surfaces visibility. It sounds great for solar panel visual assessment. But not for tall and punctual object like windturbine. r.survey return visibility value at special points, not visibility on whole area.

petrasovaa commented 2 years ago

Adding height to r.horizon seems doable, although I haven't quite understood how that would help you. I suppose you considered parallelization? I have computed in the past similar number of viewsheds so it is feasible, I imagine the memory would be the biggest hurdle in your case.

Frankd66 commented 2 years ago

Hi Anna, The height is to simulate human eye altitude (about 2m above ground). The main improvement would be to calculate horizon on each cell in the direction of a target (windturbine), and not all in the same direction. Yes my scripts are multiproc and the machine is quite powerful (64 thread/256GoRAM).

Frankd66 commented 2 years ago

I've wrote a python script based on r.profile module. But it takes about 0.1s per cell. so 11 days end 20h of calculation pour my 3200x3200 raster (one processor). The results seems no to be always the same comparing r.viewshed an r.horizon (with 2m added from viewing cell topo). I guess there is no interpolation of dem and this could makes problem when slope is important.