visibility op• Data kinds: depth → image2d
• Call: import fullseye as fs; fs.ledger.dem_viewshed(dem, cell_size, observer_rc, observer_height_m=1.7, target_height_m=0.0, max_distance_m=None) (to call the implementation directly, import demops; demops.dem_viewshed(dem, cell_size, observer_rc, observer_height_m=1.7, target_height_m=0.0, max_distance_m=None); from the registry, opsdem.get("dem_viewshed"))
Visible area from 1 point (1 = visible). Decides whether the line of sight is blocked by the terrain.
observer_rc is (row, col). The observer itself is always visible.
Procedure: eye height eye = z[observer] + observer_height_m. The line of sight to each cell is divided into ceil(hypot(H, W)) equal parts, and if at any intermediate cell the terrain elevation angle (z_mid - eye) / d_mid exceeds the target elevation angle (z + target_height_m - eye) / d, the cell is occluded (0). Intermediate points are rounded to the nearest cell, so oblique lines of sight include grid error. Earth curvature and atmospheric refraction are not included (beyond a few km, correct separately).
• dem: (H, W) [m], 3x3 or larger, sentinel values rejected (same contract as dem_slope). nan cells make comparisons false, so they neither occlude nor get occluded and stay at 1.
• cell_size: [m], positive. Used for distance tests.
• observer_rc: integer (row, col) within the grid. Outside or not a pair gives ValueError.
• observer_height_m / target_height_m: height above ground [m]. Defaults are eye height 1.7 m and ground surface 0 m. For the viewshed from a steel tower, raise observer_height_m.
• max_distance_m: cells farther than this are 0 (unlimited if omitted).
• Returns: (H, W) float64 of 1 / 0. The observer is always 1.
• Cost: whole grid × ceil(hypot(H, W)) vector operations.
dem_horizon_angle / dem_sky_view_factor conversely give "how much sky is visible from each cell".
• dem_terrain_analysis family guide
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• dem_terrain_analysis_tour — py -3.11 examples/dem_terrain_analysis_tour.py
• poc_stockpile_volume — py -3.11 examples/poc_stockpile_volume.py
image2d as input)—
visibility)dem_horizon_angle · dem_sky_view_factor
*Provenance: demops.py — DEM operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.