dem_viewshed — DEM visibility op

Data kinds: depthimage2d

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"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

1 点からの可視領域(1 = 見える)。視線が地形に遮られるかを判定する。

`observer_rc(row, col)`。観測点自身は常に可視。

手順: 目の高さ `eye = z[observer] + observer_height_m`。各セルへの視線を

`ceil(hypot(H, W)) 等分し、途中の地形の仰角 (z_mid - eye) / d_mid` が

目標の仰角 `(z + target_height_m - eye) / d` を上回るセルがあれば遮蔽(0)。

途中の点は最近傍セルに丸めるので、斜めの視線は格子誤差を含む。

地球の曲率と大気屈折は入れない(数 km 超では別途補正する)。

• `dem: (H, W) [m]、3x3 以上、番兵値は拒否(dem_slope` と同じ契約)。

`nan` セルは比較が偽になるため遮蔽にも被遮蔽にもならず 1 のまま残る。

• `cell_size`: [m]、正。距離判定に使う。

• `observer_rc: 格子内の (row, col) 整数。外や pair でないものは ValueError`。

• `observer_height_m / target_height_m`: 地面からの高さ [m]。既定は目の高さ

1.7 m と地表 0 m。鉄塔からの可視域なら `observer_height_m` を上げる。

• `max_distance_m`: これより遠いセルは 0(省略時は無制限)。

• 返り値: `(H, W)` float64 の 1 / 0。観測点は常に 1。

• 計算量: 格子全体 × `ceil(hypot(H, W))` 回のベクトル演算。

`dem_horizon_angle / dem_sky_view_factor` は逆に「各セルから空がどれだけ

見えるか」を出す。

Detailed usage guide

dem_terrain_analysis family guide

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

dem_terrain_analysis_tourpy -3.11 examples/dem_terrain_analysis_tour.py

poc_stockpile_volumepy -3.11 examples/poc_stockpile_volume.py

Ops the type connects to (they accept image2d as input)

Same category (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.