Skip to content

[codex] Make rumple a gridded metric#54

Draft
iosefa wants to merge 1 commit into
mainfrom
codex/gridded-rumple
Draft

[codex] Make rumple a gridded metric#54
iosefa wants to merge 1 commit into
mainfrom
codex/gridded-rumple

Conversation

@iosefa

@iosefa iosefa commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Make calculate_rumple consistent with the other gridded forest-structure metrics.

The released v0.4.1 implementation calculated one scalar rumple value from an existing CHM. This changes the public API so callers provide point-cloud data and voxel_resolution, and receive a 2D rumple raster plus extent, matching the pattern used by CHM/PAI/FHD-style outputs.

Changes

  • Change calculate_rumple(points, voxel_resolution, min_height=None) to return (rumple, extent).
  • Calculate rumple independently per output grid cell from local point TINs using X, Y, and HeightAboveGround.
  • Add metric="rumple" support to process_with_tiles.
  • Update rumple docs to describe the gridded point-cloud workflow.
  • Replace scalar-CHM rumple tests with gridded point-cloud tests.

Ground Area

Within each output cell, ground area is now the summed projected planar area of valid Delaunay triangles formed by the points in that cell. It is not the full rectangular cell footprint. This keeps a flat but irregularly sampled point surface at rumple 1.0, while cells with fewer than three unique point locations return NaN.

Validation

  • python -m pytest tests/test_calculate.py -q passed: 54 passed, 1 warning.
  • python -m py_compile pyforestscan/calculate.py pyforestscan/process.py pyforestscan/__init__.py
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant