Skip to content

Add visibility analysis tutorial (r.viewshed)#135

Open
Valyrian-Code wants to merge 2 commits into
OSGeo:mainfrom
Valyrian-Code:add-viewshed-tutorial
Open

Add visibility analysis tutorial (r.viewshed)#135
Valyrian-Code wants to merge 2 commits into
OSGeo:mainfrom
Valyrian-Code:add-viewshed-tutorial

Conversation

@Valyrian-Code

Copy link
Copy Markdown
Contributor

Adds a new intermediate tutorial on visibility analysis with
r.viewshed — a topic
not currently covered in the tutorial set.

What it covers

  1. A single-observer viewshed, drawn over shaded relief, and measuring the visible area.
  2. The effect of observer height — ground level (~6.4 km² visible) vs. a 40 m tower (~46.6 km²).
  3. Limiting the search with max_distance (a 3 km radius).
  4. Cumulative visibility from five sites summed with r.series, as a starting point for site optimization.

Details

  • Uses the standard North Carolina sample dataset (elevation DEM) and the grass.tools API (GRASS 8.5), consistent with the recent NumPy/Landlab tutorial.
  • All code was run against GRASS 8.5; the figures are real outputs of the workflow. The tutorial renders cleanly with Quarto (eval: false, following the other Python tutorials).
  • Categories: raster, terrain, visualization, intermediate, Python.
  • Cross-links to the Terrain/DEMs and Modeling Movement tutorials.

Feedback on scope, wording, or the choice of observer sites is very welcome.

New intermediate tutorial covering viewshed/visibility analysis:
- a single-observer viewshed and measuring the visible area
- the effect of observer height (ground vs 40 m tower) and max_distance
- cumulative visibility from multiple sites with r.series

Uses the North Carolina sample dataset and the grass.tools API (GRASS 8.5).
Categories: raster, terrain, visualization, intermediate, Python.
Copilot AI review requested due to automatic review settings July 4, 2026 04:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@veroandreo

Copy link
Copy Markdown
Contributor

The example developed is pretty basic, and the images are not visually appealing. They are too big, the legend and scale bar overlap. I would like to read a more compelling story, i.e., the observer in the center of the map is easy, but why are they there? Perhaps you could pick a different dataset or a different area and still make the tutorial reproducible by using r.in.usgs or i.eodag, and place the observer and the towers in places that actually mean something, not just in the center of the region. Please have a look at https://github.com/ncsu-geoforall-lab/grass-gis-workshop-foss4gna-2023, esp. notebooks 2 and 3, which cover similar analysis.

Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/images/cumulative.webp Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Comment thread content/tutorials/viewshed/visibility_analysis.qmd Outdated
Address review feedback: replace the synthetic center-of-map observer
with a real story. The tutorial now uses three historic fire lookout
towers in the Nantahala National Forest (Wayah Bald, Wesser Bald,
Albert Mountain, verified coordinates on the Appalachian Trail) and
downloads real USGS 1 arc-second elevation via the r.in.usgs addon
into a new EPSG:32617 project, with a pinned tile for reproducibility.

Content changes:
- observer height: standing on the bald vs the 16 m cab (165 vs 277 km2)
- Earth curvature with -c at a lookout's 32 km range, and why the
  effect is small in ridge-limited terrain
- target_elevation as a rising smoke column (277 to 412 km2 detectable)
- three-tower network summed with r.series, coverage reported as a
  table from r.report JSON output (44% of the region)
- new worked section on siting a fourth tower: the best candidate
  recovers under 4% of the blind area because the gaps are valleys

Figures regenerated at 600 px with labeled towers (d.text), shaded
relief bases, non-overlapping legend and scale bar, and zoomed extents
for the single-tower maps. Get-started link now points to the Python
quick start; callouts are spread out; area estimation commands are
shown in the text.
@Valyrian-Code

Copy link
Copy Markdown
Contributor Author

Thanks @veroandreo, this was the right push. I reworked the tutorial from scratch around a real story: the historic fire lookout towers of the Nantahala National Forest (Wayah Bald, Wesser Bald, and Albert Mountain, all still standing along the Appalachian Trail near Franklin, NC). The terrain now comes from the USGS via the r.in.usgs addon into a fresh EPSG:32617 project, so it is fully reproducible: one pinned tile of about 58 MB, with a callout on previewing the download with -i first.

The observers now mean something. These towers were sited for visibility, so each section answers a question their builders actually faced:

  • Observer height: standing on the bald vs the 16 m cab (165 vs 277 km² visible), which is why the towers were built.
  • Earth curvature with -c at a lookout's 32 km range, including why the effect is small in ridge-limited terrain.
  • target_elevation as a rising smoke column: detectable area grows from 277 to 412 km², since a lookout watches for smoke, not ground.
  • The three-tower network summed with r.series, with per-class coverage reported as a table from r.report JSON output (44% of the region).
  • A worked "where should a fourth tower go?" section: the best candidate summit recovers under 4% of the blind area, because the remaining gaps are valley bottoms that no ridgetop tower can see. That diminishing-returns result is, I think, the most interesting number in the tutorial.

On the images: regenerated at 600 px with labeled towers, shaded relief bases, non-overlapping legend and scale bar, and zoomed extents for the single-tower maps. The get-started link now points to the Python quick start, the callouts are spread out, and the area estimation commands are shown in the text.

Happy to adjust anything else.

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