Skip to content

Fix target_elev contaminating horizon in dask viewshed distance sweep (#1098)#1099

Merged
brendancol merged 1 commit into
masterfrom
issue-1098
Mar 30, 2026
Merged

Fix target_elev contaminating horizon in dask viewshed distance sweep (#1098)#1099
brendancol merged 1 commit into
masterfrom
issue-1098

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Split _sweep_ring gradient into two arrays: one with target_elev for visibility testing, one without for horizon updates. Added regression test. Fixes #1098.

…#1098)

_sweep_ring used a single gradient array that included target_elev for
both the visibility test and the horizon update.  The horizon profile
should only reflect raw terrain gradients — target_elev is the height
offset of the thing you're looking for, not extra height on every cell
that might block your view.

Split the gradient into two arrays: gradients (with target_elev, for
visibility) and terrain_gradients (without, for horizon update).
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Mar 30, 2026
@brendancol brendancol merged commit 18177b4 into master Mar 30, 2026
11 checks passed
@brendancol brendancol deleted the issue-1098 branch May 4, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

viewshed dask Tier C distance sweep: target_elev contaminates horizon profile

1 participant