Skip to content

Calculate rumple on the voxel grid - #55

Open
iosefa wants to merge 4 commits into
mainfrom
feature/add-rumple-metric
Open

iosefa wants to merge 4 commits into
mainfrom
feature/add-rumple-metric

Conversation

@iosefa

@iosefa iosefa commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Rumple now returns a raster on the same voxel grid as canopy cover, PAI, and FHD. Each cell uses canopy maxima and its eight neighbors to calculate surface area with the Jenness method.

Adds optional interpolation to fill missing canopy heights before calculating rumple. Use interpolation="linear", "cubic", or "nearest"; the default leaves gaps unfilled. Observed heights are preserved, and the height threshold still applies. This also works with tiled output, where larger gaps may need a wider buffer.

Includes tiled GeoTIFF output, docs, tests, and an updated notebook map. In the notebook, linear interpolation fills 30,499 missing rumple cells and increases coverage from 96.6% to 99.6%.

Validation: 152 tests passed, with one existing slow integration test skipped. CI passes on Python 3.11, 3.12, and 3.13. The notebook ran end to end and the docs built successfully.

Also updates the PDAL pin so CI keeps the installed 3.5.x bindings instead of downgrading to 3.4.5.

This overlaps #54, which uses a different calculation. This version builds the canopy surface from column maxima and uses the Jenness surface-area method.

@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

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines Coverage Δ
pyforestscan/calculate.py 75.08% <100.00%> (+20.13%) ⬆️
pyforestscan/process.py 63.70% <100.00%> (+12.94%) ⬆️
tests/test_calculate.py 100.00% <100.00%> (ø)
tests/test_process.py 94.63% <100.00%> (+3.80%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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