option for faster slope based method in skyview#748
Merged
Conversation
Contributor
Author
|
Alternatively, instead of having this in geometry which is a bit chaotic… The method could live within skyview.py, and could be called at the start of ApplyOE, and save a sky view image file.. would be easier to implement checks in this way too. |
Contributor
Author
Collaborator
|
@pgbrodrick - run backwards compatibility checks. |
Collaborator
|
Confirmed that there are no impacts running in previous modes. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In the last PR we implemented a skyview tool that can be ran with ancillary DEM to output skyview factor map. This output skyview map can be optionally input into ApplyOE. Applying skyview tool on the DEM from the LOC file would result in errors along the borders though (on the order of ~1 km inward into the image), which is why we didn't include the tool directly.
If skyview is not passed (and an array of 1s is created) we can compute an estimate of sky view just as a function of the slope (see page 41 in EnMap processing). One possible approximation is simply$cos^2(Slope/2)$ . This of course assumes slope is an actual value and is computed correctly ⚠️ ... Which could cause some very large errors if data are incorrect.
There may be other ways to leverage the horizon tool for some of the interior data, and fallback to this simple method?... It is computationally fast but not negligible, and so there would be no need to run a full horizon computation on a scene that could be assumed to be mostly flat, or could otherwise be approx. well with ,$cos^2(Slope/2)$ .