dem_tpi — DEM surface op

Data kinds: depthimage2d

Call: import fullseye as fs; fs.ledger.dem_tpi(dem, cell_size=1.0) (to call the implementation directly, import demops; demops.dem_tpi(dem, cell_size=1.0); from the registry, opsdem.get("dem_tpi"))

Usage

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

地形位置指数 TPI —— 自セルと 8 近傍平均の差 [m]。正が尾根、負が谷。

式: `tpi = z - mean(8 近傍の z)`(Weiss の TPI を 3x3 の最小近傍で取ったもの)。

縁は端の値を複製して埋める。近傍が 1 セル固定なので、**スケールは

`cell_size` 1 つぶんに固定**で、より広い尾根/谷を見たいときは先に

`dem` を粗くする(この op に半径の引数は無い)。

• `dem: (H, W) [m]、3x3 以上、実数、inf 不可。欠測は nan`(番兵値

`<= -9000nan 無しで入っていれば拒否)。nan` は 3x3 に伝播する。

• `cell_size`: 結果には影響しない(差分に距離は入らない)が、単位が [m] である

ことを呼び出し側に意識させるため受け取り、正の有限値かを検査する。

• 返り値: `(H, W)` float64 [m]。0 付近が斜面の途中、正が凸(尾根・頂)、

負が凹(谷・窪地)。

• 失敗: `ValueError(形、番兵値、cell_size`)。

`dem_roughness`(同じ近傍の RMS)と組み合わせると地形分類の特徴になる。

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

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

Same category (surface)

dem_slope · dem_aspect · dem_curvature · dem_roughness


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