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

limit viewshed horizontally by specifying two angles #180

Merged
merged 2 commits into from
Nov 7, 2019

Conversation

petrasovaa
Copy link
Contributor

No description provided.

@petrasovaa petrasovaa requested a review from metzm November 5, 2019 15:01
@petrasovaa
Copy link
Contributor Author

Can't get to trac right now, so commenting here. This is already updated patch from what is here: https://trac.osgeo.org/grass/ticket/3926
so it should work, I tested it.

@metzm
Copy link
Contributor

metzm commented Nov 7, 2019

I can confirm, it works fine.
Just one comment: the code uses atan2() which is costly (takes computational time). Can you build in a test if the limitation is really needed? If not, don't even test, avoiding atan2(). Something like
if (fabs(minAngle - maxAngle) != 360) ...

@petrasovaa
Copy link
Contributor Author

Right. To avoid any float comparison, it's checked outside depending if user requested the direction limit.

@metzm
Copy link
Contributor

metzm commented Nov 7, 2019

Looks good to me, ready to be merged.

@petrasovaa petrasovaa merged commit 4b74af1 into OSGeo:master Nov 7, 2019
@petrasovaa petrasovaa deleted the feature/viewshed-direction branch November 7, 2019 16:27
@neteler neteler added this to the 7.8.1 milestone Dec 9, 2021
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

Successfully merging this pull request may close these issues.

3 participants