Studio Matrx Monthly · Volume 1 · Issue 3 · August 2026
Amogh N P
 In loving memory of Amogh N P — Architect · Designer · Visionary 
Viewshed and HydrologyLesson 5.3
GIS for Architecture, Planning & Urban Design/Module 5 · Raster & Terrain Analysis

Lesson 5.3 · Raster & Terrain Analysis

Viewshed and Hydrology

What the land lets you see, and where the water decides to go

13 min Interactive lessonFree · open lessonByAmogh N P· Architect & interior designer
The hook

Will the tower block the temple view? Where will the cloudburst pool on the site?

Both questions are answered by the same 30 m grid of heights, run through two different engines. Viewshed asks the DEM every line of sight from a point and returns exactly what is visible. Hydrology asks the DEM which way water rolls off every cell and traces it into streams and catchments. One elevation model; two of the most consequential analyses a designer can do - one about sight, one about water. This lesson teaches both, and is honest about how much they depend on DEM quality.

Before you love a plot, ask the DEM where the water goes. It answers for free and it never lies about slope.

Viewshed: what can be seen from where

A viewshed is the set of all cells visible from one or more observer points, computed by tracing a straight line of sight from the observer to every other cell and checking whether the intervening terrain rises high enough to block it. Cells the land hides are 'not visible'; the rest form the viewshed. It is a global operation in Tomlin's sense - each output cell depends on the whole run of terrain between it and the observer, not just its neighbours.

The inputs are more than the DEM. Observer height matters (eye level versus a 60 m tower changes everything), as does target height, a radius (you rarely care beyond a few kilometres), and whether you account for Earth curvature and refraction at distance. Run it from many points and you get cumulative visibility - how often each cell is seen - which is how planners map visual exposure of a ridge or the visual catchment of a landmark.

The design uses are direct. A reverse viewshed - what can see a given place - maps how exposed a proposed tower or quarry will be from the surrounding town, the basis of visual-impact assessment. A forward viewshed from a proposed apartment tells you which floors actually earn the 'sea view' in the brochure. Between them they turn an argument about visual amenity into a mapped, contestable claim.

Viewshed: what an observer can and cannot see observer blocked by ridge visible hidden the DEM decides every line of sight - so viewsheds live or die by DEM quality
Zoom
A viewshed traces straight lines of sight over the DEM from an observer; ground the ridge blocks stays hidden, so results are only as honest as the elevation model.

A bare-earth DEM cannot see trees or buildings. Your viewshed is of the ground, not the city.

The honest limits of a viewshed

Viewsheds are seductive and easily wrong. Most DEMs are bare-earth (a DTM): they contain no buildings and no trees, so a viewshed over one assumes an empty landscape - it will happily 'see' straight through a forest or a built-up block. If you need real-world visibility in a city you need a surface model (DSM) that includes structures and canopy, which is rarer and usually lidar-derived.

Resolution bites again: a 30 m DEM misses the very ridgeline or embankment that would block a view. And the algorithm's assumptions (curvature, refraction, observer/target heights) change the answer materially. Treat a viewshed as a rigorous hypothesis to verify on site, not a courtroom certainty - and always state the DEM type and heights you used.

Every viewshed is really a sentence: 'from this height, over THIS DEM, ignoring trees...'. Say it out loud.

Hydrology step 1 - fill the sinks, then flow direction

Terrain hydrology is a fixed pipeline, and it starts with a clean-up. Real DEMs contain sinks - single cells or dips with no lower neighbour, mostly noise - and water would get trapped in them. So the first step is always fill sinks, raising those pits until water can escape.

Then comes flow direction: for every cell, the algorithm decides which way water leaves it. The classic D8 method sends all of a cell's water to whichever of its eight neighbours lies steepest downhill - one direction per cell. (More sophisticated methods split flow across several neighbours, better for gentle terrain.) The result is a grid of little arrows, the skeleton on which everything downstream is built.

Flow direction (D8): water takes the steepest downhill step 78 74 70 72 66 60 64 55 48 each cell drains to one of 8 neighbours fill the pits first, or flow gets trapped in one-cell dips
Zoom
D8 flow direction sends each cell's water to whichever of its eight neighbours lies steepest downhill; sinks must be filled first or flow gets trapped.

Hydrology step 2 - accumulation, streams and watersheds

Once every cell knows where its water goes, flow accumulation counts, for each cell, how many upstream cells ultimately drain through it. Cells with tiny counts are hillslopes; cells with large counts are where water concentrates - and if you threshold the accumulation grid (say, keep cells with more than 500 upstream cells) you extract the stream network straight from the terrain. That threshold is a judgement, not a law: lower it and you grow a denser network of minor gullies, raise it and you keep only the major channels.

Finally, a watershed (catchment / basin) is every cell that drains to a chosen outlet or 'pour point'. Drop a pour point at a culvert, a drain inlet or a river gauge and the GIS traces the whole area contributing runoff to it. One caution that trips up beginners: the pour point must sit exactly on a high-accumulation stream cell, so most tools offer a 'snap pour point' step that nudges it onto the channel first. For a designer this is gold: it tells you how much land sheds water onto your site, where a retention pond should sit, and which catchment a proposed development actually lies in.

Accumulation builds streams; the watershed is all that drains to one outlet watershed boundary outlet (pour point) more upstream cells drain through a cell, the higher its accumulation - that is a stream
Zoom
Flow accumulation counts how many cells drain through each cell; high counts trace the stream network, and the watershed is every cell that drains to a chosen outlet.

Why this matters on a real Indian site

India's urban flooding is, at root, a hydrology-ignored-at-the-plot-scale problem: buildings placed in natural drainage lines, tanks and nalas built over, catchments sealed with concrete so runoff spikes. A quick DEM-based flow-accumulation run - even on free 30 m CartoDEM - reveals the natural drainage lines crossing a site before you place a building on one. It will not size a storm drain (that needs rainfall, soil and finer terrain), but it will stop the gross mistakes.

Use it early: overlay the derived stream network and the site's catchment on your plot at concept stage, and let water veto the obviously bad footprints. Then hand the numbers to a hydraulic engineer for the design storm.

Water has read the terrain for millennia. The DEM just lets you read its notes.

DEM products and tools for viewshed and hydrology

CartoDEM (via Bhuvan)

India national DEM, 30 m and 90 m

Free via Bhuvan; adequate for catchment context and landform viewsheds, not for storm-drain sizing.

ALOS PALSAR (ASF)

~12.5 m terrain-corrected DEM tiles

Free via Alaska Satellite Facility; a finer grid that sharpens flow lines and ridgeline visibility.

OpenTopography

Lidar DEMs (bare-earth and surface) where available

Free; the source for a true surface model (DSM) if you need urban viewsheds that respect buildings and trees.

GRASS / SAGA hydrology tools

Open-source terrain-hydrology algorithms (fill, flow, accumulation, watershed, viewshed)

Run inside QGIS via the Processing toolbox; the free equivalent of ArcGIS Spatial Analyst's Hydrology and Viewshed tools.

Hands-on workshop

Workshop - delineate your site's catchment and test a view

Run the full hydrology pipeline to find the drainage lines and watershed feeding your site, then run a viewshed from a proposed upper floor.

QGIS 3.44 with GRASS/SAGA providers (built in) or ArcGIS Pro with Spatial Analyst; a DEM (CartoDEM/SRTM/ALOS).

Given & goal
Given: a DEM covering your site plus its upstream area; one pour point at the site's low corner; one observer point at a proposed rooftop
Goal: filled DEM, flow direction, accumulation, stream network, watershed + one viewshed
Time: ~75 minutes
  1. 1Reproject the DEM to a metre-based CRS and fill sinks. In QGIS: Processing > SAGA 'Fill Sinks' or GRASS r.fill.dir. In ArcGIS Pro: Spatial Analyst > Hydrology > Fill.
  2. 2Compute flow direction (D8). In QGIS: GRASS r.watershed or SAGA flow tools. In ArcGIS Pro: Spatial Analyst > Hydrology > Flow Direction.
  3. 3Compute flow accumulation, then threshold it to extract a stream network. In QGIS: GRASS r.watershed accumulation output, then raster calculator to keep high-count cells. In ArcGIS Pro: Hydrology > Flow Accumulation, then Con/Reclassify.
  4. 4Delineate the watershed for your pour point. In QGIS: GRASS r.water.outlet (snap the point to the stream first). In ArcGIS Pro: Hydrology > Snap Pour Point, then Watershed.
  5. 5Run the viewshed from your rooftop observer with a realistic observer height and radius. In QGIS: GRASS r.viewshed (Processing toolbox). In ArcGIS Pro: Spatial Analyst > Viewshed (or Visibility). Note the DEM type in your legend.

You’ll walk away with
A map of your site's stream network and contributing watershed, plus a viewshed from a proposed floor - each captioned with the DEM type, resolution and observer height used.

The worked example

Three altitudes on the same idea

Read the band that fits you — or all three.

For the architectSite, form & environment

Viewshed protects your best asset and hydrology protects your worst risk. Test whether upper floors catch the view (and whether you block a neighbour's), and run flow accumulation to find the natural drainage lines you must not build across. Both are concept-stage checks that save expensive late surprises.

For the plannerLand use, zoning & infrastructure

Watersheds and visual catchments are statutory-scale tools. Catchment delineation underpins storm-water master planning, blue-green networks and no-build buffers along natural drains; cumulative viewsheds justify ridgeline and heritage-view protection zones in a development plan. These are evidence a plan can defend at a hearing.

For the urban designerStreets, blocks & public realm

Sightlines and water shape the public realm. Viewshed analysis tests whether a proposed landmark terminates a vista or whether a tower steals a shared view; hydrology finds the low lines where a linear park or a sunken plaza can double as a floodable space. Design with the water, not against it.

Misconception check

A viewshed shows exactly what a person will actually see from the site.

Only if the DEM includes everything that blocks a view - and most do not. Standard DEMs are bare-earth, so a viewshed ignores buildings, walls and trees and will 'see' through a whole neighbourhood. Real urban visibility needs a surface model (DSM) with structures and canopy, plus honest observer and target heights. A bare-earth viewshed is a useful first pass and a landform-scale tool, not a guarantee of the view from a window.
Try it

Do it yourself

No software needed - trace the logic.

  1. 1Put the hydrology steps in order: watershed, flow accumulation, fill sinks, flow direction.
  2. 2Why must sinks be filled before flow direction is computed? Answer in one sentence.
  3. 3A cell has a very high flow-accumulation value. What kind of feature is it likely to be, and why?
  4. 4You run a viewshed over a bare-earth DEM in a dense city and it says a rooftop sees five kilometres. Give the one word that explains the over-optimism.
  5. 5For the same pour point, would a coarser (90 m) DEM give a larger or a more uncertain watershed boundary? Explain briefly.
Take this with you

The one line to carry out

From one DEM you can compute both what is visible (viewshed) and where water goes (fill, flow direction, accumulation, watershed) - but both are only as truthful as the DEM's type and resolution. Use them early to veto bad footprints and protect views, then hand the details to survey and engineering.
Take it further
References & further reading

Peer-reviewed journals & authoritative standards

  1. 01Wilson, J.P. & Gallant, J.C. (eds) — Terrain Analysis: Principles and ApplicationsWiley, 2000.
  2. 02Burrough, P.A., McDonnell, R.A. & Lloyd, C.D. — Principles of Geographical Information Systems, 3rd ed.Oxford University Press, 2015.
  3. 03de Smith, M.J., Goodchild, M.F. & Longley, P.A. — Geospatial Analysis: A Comprehensive Guide, 7th ed.Winchelsea Press, 2025.
  4. 04Longley, P.A., Goodchild, M.F., Maguire, D.J. & Rhind, D.W. — Geographic Information Science and Systems, 4th ed.Wiley, 2015.
  5. 05National Remote Sensing Centre (NRSC), ISROISRO / Dept. of Space, Govt. of India, ongoing.
Related lessons
Recap
Viewshed = visible cells from an observer over the DEM (bare-earth by default). Hydrology pipeline = fill sinks, flow direction (D8), flow accumulation (streams), watershed to a pour point.
Carry forward →

We can now read terrain and water; the last step of the module folds these and other layers into one honest decision - the multi-criteria site suitability method that carries McHarg's overlay into GIS.

A

The author

Amogh N P

Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.

More about Amogh →