Skip to content

r.reclass.area: add upper and lower option and rewrite with Tools API#7337

Open
ninsbl wants to merge 12 commits intoOSGeo:mainfrom
ninsbl:reclass_area_improvement
Open

r.reclass.area: add upper and lower option and rewrite with Tools API#7337
ninsbl wants to merge 12 commits intoOSGeo:mainfrom
ninsbl:reclass_area_improvement

Conversation

@ninsbl
Copy link
Copy Markdown
Member

@ninsbl ninsbl commented Apr 22, 2026

This PR rewrites r.reclass.area with the Tools API and extends / changes the API in a backward compatible way.
The changes allow r.reclass.area to filter different ranges (upper/lower) in one go and allows users to benefit from new options
in the underlying tools (like minsize in r.clump). Also users can now safe some procesingtime depending on their workflows by being able to use different input and output.

Tests are extended accordingly and also backwards-compatibility is tested.

@github-actions github-actions Bot added raster Related to raster data processing Python Related code is in Python module docs markdown Related to markdown, markdown files tests Related to Test Suite labels Apr 22, 2026
Comment thread scripts/r.reclass.area/r.reclass.area.md Outdated
Comment thread scripts/r.reclass.area/r.reclass.area.md Outdated
@ninsbl
Copy link
Copy Markdown
Member Author

ninsbl commented Apr 22, 2026

Sorry for the noise. I actually ment to open the PR against my fork while working on it...

@ninsbl
Copy link
Copy Markdown
Member Author

ninsbl commented Apr 24, 2026

Please note: I had to adjust the unit test testrra.py when testing the rmarea method with lesser mode. Before this PR r.reclass.area actualy could not apply the lesser mode with rmarea and silently applied the greater mode instead. Therefore also the identical expected results in the original version of testrra.py for modes lesser and greater_ with rmarea.

I would consider that a bug actually, which is why I felt it was appropriate to change the expected output values for the test as done in this commit: 059c1ac

With this PR the combination of modes lesser and greater_ with rmarea are possible and applied correctly.

@ninsbl ninsbl requested review from neteler and wenzeslaus April 24, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs markdown Related to markdown, markdown files module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant