Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple fix: Allow for negative target elevation. #808

Open
trygvels opened this issue Oct 3, 2024 · 1 comment
Open

Simple fix: Allow for negative target elevation. #808

trygvels opened this issue Oct 3, 2024 · 1 comment

Comments

@trygvels
Copy link

trygvels commented Oct 3, 2024

Author of Proposal:

Reason or Problem

I use the library to carry out viewshed analyses from an observer in a tall building, to see if they can see the facade of buildings around a city. However, running the viewshed function using DOM data. However, most of the visible points returned correspond to rooftops, and not actual building facades.

Proposal

To deal with this problem, it would be useful to be able to pass a negative target height, so that all other points are treated normally, but the target point has a decreased z-value.

Design:
Implementing this should be simple, if I am understanding the code correctly. It should simple be a case of changing the following if statement:
if target_elev > 0: to iff abs(target_elev) > 0: for the _viewshed_cpu - case.

I have done this in my local version of the code, but if you agree that this solves my issue, than it would be great if it was included in a future version.

If you want, I can also do a pull request.

@brendancol
Copy link
Contributor

@trygvels Sorry for the late reply and thanks for the contribution

Negative target elevation sounds reasonable so I'll help to test / merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants