Skip to content

Add multi-observer viewshed and line-of-sight profiles (#1145)#1160

Open
brendancol wants to merge 10 commits intomasterfrom
issue-1145
Open

Add multi-observer viewshed and line-of-sight profiles (#1145)#1160
brendancol wants to merge 10 commits intomasterfrom
issue-1145

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • New xrspatial/visibility.py module with three functions: cumulative_viewshed, visibility_frequency, and line_of_sight
  • cumulative_viewshed counts how many observers can see each cell, calling the existing viewshed() per observer and summing binary masks
  • visibility_frequency is cumulative_viewshed / n_observers
  • line_of_sight walks a Bresenham transect between two points, returns elevation profile + visibility status, and optionally checks first Fresnel zone clearance (for radio link work)
  • 25 tests: correctness, edge cases, dask-numpy parity, coordinate preservation
  • Exports added to __init__.py, .xrs accessor, docs reference, README feature matrix
  • User guide notebook: 48_Visibility_Analysis.ipynb

Closes #1145

Test plan

  • 25/25 tests pass (pytest xrspatial/tests/test_visibility.py)
  • Top-level imports work
  • Accessor methods work
  • Notebook renders correctly

@github-actions github-actions bot added the performance PR touches performance-sensitive code label Apr 2, 2026
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.

Add multi-observer viewshed and line-of-sight profiles

1 participant