Skip to content

r.reclass.area: preserve backwards compatibility - #7806

Merged
metzm merged 3 commits into
OSGeo:mainfrom
metzm:bug_r.reclass.area
Aug 7, 2026
Merged

metzm merged 3 commits into
OSGeo:mainfrom
metzm:bug_r.reclass.area

Conversation

@metzm

@metzm metzm commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Up to G85, there was a inconsistency in the behaviour of r.reclass.area: mode=lesser method=rmarea removed areas smaller than value, whereas mode=lesser method=reclass removed areas larger than value.

PR #7337 fixed this inconsistend behaviour with the introduction of the new options lower and upper, replacing the mode and value options up to G85. This is great! But handling of backwards compatibility did not take into account the inconsistency in the behaviour up to G85. This PR fixes the backwards compatibility of PR #7337.

@metzm metzm added this to the 8.6.0 milestone Aug 5, 2026
@metzm
metzm requested a review from ninsbl August 5, 2026 18:34
@metzm metzm added bug Something isn't working raster Related to raster data processing Python Related code is in Python labels Aug 5, 2026
@github-actions github-actions Bot added the module label Aug 5, 2026
ninsbl
ninsbl previously approved these changes Aug 5, 2026

@ninsbl ninsbl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I overlooked the inconsistency. Should this be mentioned in the manual, also your comment on the rmarea method?

@metzm

metzm commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the fix. I overlooked the inconsistency. Should this be mentioned in the manual, also your comment on the rmarea method?

IMHO, the previous inconsistency does not need to be mentioned in the manual since you fixed it with the new options. The current behaviour, when are areas removed and when are areas merged with neighbours, should be added to the manual. The name of the module itself, r.reclass.area, does not give a hint about what happens with areas outside the given threshold(s) and needs explanation.

@metzm

metzm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@ninsbl You are welcome to improve my changes to the manual regarding the new lower option.

@ninsbl ninsbl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some autocomplete issues from your IDE...

@echoix

echoix commented Aug 6, 2026

Copy link
Copy Markdown
Member

Also: make sure the typos in the title and the commit message are fixed before merging (relclass -> reclass)

@ninsbl ninsbl changed the title r.relcass.area: preserve backwards coompatibility r.reclass.area: preserve backwards coompatibility Aug 6, 2026
@metzm metzm changed the title r.reclass.area: preserve backwards coompatibility r.reclass.area: preserve backwards compatibility Aug 6, 2026
@github-actions github-actions Bot added HTML Related code is in HTML docs markdown Related to markdown, markdown files labels Aug 6, 2026
@metzm
metzm force-pushed the bug_r.reclass.area branch from ea785fc to f1944bc Compare August 7, 2026 16:27
@metzm
metzm merged commit 0850a40 into OSGeo:main Aug 7, 2026
26 checks passed
@metzm
metzm deleted the bug_r.reclass.area branch August 7, 2026 18:45
@metzm

metzm commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@echoix typos fixed in 0850a40

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

Labels

bug Something isn't working 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants