Working manuscript — research draft for public review.

Ground-supported viewshed calculation

The pseudocode explains the two surface roles. A reproducible implementation must additionally define sampling, interpolation, endpoint-cell treatment, the blocking comparison, missing-data rules and the earth model.

The ground raster supplies standing elevation where the intended viewers stand on that terrain. An elevated deck or walkway requires its actual standing elevation. The obstruction surface represents an opaque envelope unless a more detailed scene is specified.

Inputs: ground elevations G, obstruction elevations S,
        fixed project position and absolute elevation P,
        viewer eye height h, viewer locations R, numerical rules

for each viewer location r in R:
    ground elevation = sample G at r
    if ground elevation is unavailable:
        record unknown and continue
    eye elevation = ground elevation + h
    construct the sightline from that eye to P
    sample S along the sightline using the declared numerical rules
    record visible, blocked, or unknown using the declared
        blocking and missing-data rules

apply the declared viewer-eligibility rule to the recorded results
retain the exclusion mask separately from geometric visibility

The same ground-supported line can be tested against G to produce the terrain-only comparison. Supporting the eye on S while also sampling S produces the surface-only comparison. Applying a height mask to that completed surface-only result leaves the original sightline unchanged wherever the mask retains it.

A conceptual input called S may be a resolved obstruction scene rather than a single file. The maintained toolbox's preparation and numerical rules are documented separately with the Work PC qualification records. In the controlled landscape comparison, missing DSM cells use prepared DTM elevations, while valid DSM values below terrain remain unchanged. This pseudocode is not a substitute for those rules and does not imply that the compiler, interpolation or layer precedence is identical across software.

An equivalent calculation can obtain the same eye elevations from explicitly constructed three-dimensional points. The essential requirement is to preserve the two elevation roles, not to require two files. Missing obstruction data also require a stated interpretation: skipping an unknown part of the ray does not establish that a real view through it is clear.