Skip to content

Add gridded rumple with two surface methods - #55

Merged
iosefa merged 6 commits into
mainfrom
feature/add-rumple-metric
Oct 15, 2026
Merged

iosefa merged 6 commits into
mainfrom
feature/add-rumple-metric

Conversation

@iosefa

@iosefa iosefa commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Adds calculate_rumple_grid() to calculate a rumple map from a CHM, with separate surface and output resolutions. For example, a 1 m CHM can produce a 20 m rumple raster. calculate_rumple() returns one value for the whole CHM.

Both functions accept method="two_triangle" (default) or method="jenness". Two-triangle excludes any patch with a missing height from both surface and ground area. Jenness omits missing center cells and uses the center height for missing neighbors, following lidR's raster calculation. Optional interpolation fills heights during CHM creation. min_height treats low heights as missing without modifying the input CHM.

Includes tiled GeoTIFF output, documentation of the methods and missing-data rules, and an executed notebook showing both methods. Also updates the PDAL requirement to match the bindings installed in CI.

Validation: 185 tests passed, with one slow integration test skipped. Jenness matches reference values generated in R with sp::surfaceArea. The notebook ran end to end and the docs built successfully. The documentation revision was checked to leave executable Python and notebook code unchanged.

@iosefa iosefa self-assigned this Oct 1, 2026
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 99.39516% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyforestscan/process.py 98.21% 2 Missing ⚠️
pyforestscan/calculate.py 99.02% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
pyforestscan/__init__.py 100.00% <ø> (ø)
tests/test_process.py 96.00% <100.00%> (+5.16%) ⬆️
tests/test_rumple.py 100.00% <100.00%> (ø)
pyforestscan/calculate.py 79.41% <99.02%> (+24.46%) ⬆️
pyforestscan/process.py 68.70% <98.21%> (+17.93%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@iosefa iosefa changed the title Calculate rumple on the voxel grid Add gridded rumple while preserving the scalar API Oct 13, 2026
@iosefa iosefa changed the title Add gridded rumple while preserving the scalar API Add gridded rumple with two surface methods Oct 15, 2026
@iosefa
iosefa merged commit 83cc162 into main Oct 15, 2026
3 checks passed
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.

2 participants