Skip to content

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

Merged
ninsbl merged 18 commits into
OSGeo:mainfrom
ninsbl:reclass_area_improvement
Jul 13, 2026
Merged

ninsbl merged 18 commits into
OSGeo:mainfrom
ninsbl:reclass_area_improvement

Conversation

@ninsbl

@ninsbl ninsbl commented Apr 22, 2026

Copy link
Copy Markdown
Member

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
@ninsbl

ninsbl commented Apr 22, 2026

Copy link
Copy Markdown
Member Author

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

@ninsbl

ninsbl commented Apr 24, 2026 •

Copy link
Copy Markdown
Member Author

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
@ninsbl
ninsbl requested a review from echoix July 7, 2026 20:25
@github-actions github-actions Bot added windows Microsoft Windows specific GUI wxGUI related macOS macOS specific docker Docker related CI Continuous integration vector Related to vector data processing temporal Related to temporal data processing C Related code is in C HTML Related code is in HTML translation Message translation related database Related to database management libraries general display imagery labels Jul 7, 2026
@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 Jul 10, 2026
neteler and others added 4 commits July 13, 2026 11:18
Co-authored-by: Markus Neteler <markus@neteler.org>
@github-actions github-actions Bot added the HTML Related code is in HTML label Jul 13, 2026
@ninsbl
ninsbl enabled auto-merge (squash) July 13, 2026 09:39
@ninsbl
ninsbl merged commit 2e02066 into OSGeo:main Jul 13, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 13, 2026
echoix added a commit to wenzeslaus/grass that referenced this pull request Jul 14, 2026
…OSGeo#7337)

* move to Tools API

* add upper/lower filter range options) (backwards compatible) for both vector and raster based filtering

* propagate options of underlying tools (r.clump)

* add tests

Co-authored-by: Markus Neteler <markus@neteler.org>

* Edit html

* Unchange header line

* typos

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Co-authored-by: Markus Neteler <markus@neteler.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs HTML Related code is in HTML 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.

3 participants