Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Use r.mask.status to get info about mask #4519

Merged
merged 7 commits into from
Jan 29, 2025

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Oct 14, 2024

This replaces low level checks of MASK raster in the current mapset with calls of r.mask.status. At the same time, it prepares the code for arbitrary mask names from #2392.

GConsole and SbMask require r.mask.status to output a potential name of the mask regardless of mask being set or not, so this is using the name from #4531 in r.mask.status which simply gives the name of the mask whether or not it is active.

History now records the name of the mask both for 2D and 3D. This is not used in the GUI at this point.

The status bar does not say "MASK" in all caps anymore, but says "Mask" or "raster mask".

Screenshot from 2025-01-27 13-26-15

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python libraries labels Oct 14, 2024
@wenzeslaus
Copy link
Member Author

Depends on #4531.

@echoix
Copy link
Member

echoix commented Dec 31, 2024

Depends on #4531.

#4531 was merged last month

@echoix echoix force-pushed the use-r_mask_status-in-gui branch from 197732c to 62afeed Compare December 31, 2024 17:42
This replaces low level checks of MASK raster in the current mapset with calls of r.mask.status.

GConsole and SbMask require r.mask.status to output a potential name of the mask regerdless of mask being set or not, so this functionality still needs to be implemented first before moving this PR forward. History changes seem to be complete.
@wenzeslaus wenzeslaus force-pushed the use-r_mask_status-in-gui branch from 62afeed to 7a965a5 Compare January 27, 2025 18:20
@wenzeslaus wenzeslaus requested a review from petrasovaa January 27, 2025 18:23
@wenzeslaus
Copy link
Member Author

@lindakarlovska Feel free to review or comment here. I might be able to incorporate changes even after this is merged.

@wenzeslaus wenzeslaus marked this pull request as ready for review January 27, 2025 18:24
python/grass/grassdb/history.py Outdated Show resolved Hide resolved
@petrasovaa petrasovaa enabled auto-merge (squash) January 29, 2025 15:04
@petrasovaa petrasovaa merged commit 6a32875 into OSGeo:main Jan 29, 2025
27 checks passed
@wenzeslaus wenzeslaus deleted the use-r_mask_status-in-gui branch January 29, 2025 15:56
@github-actions github-actions bot added this to the 8.5.0 milestone Jan 29, 2025
@lindakarlovska
Copy link
Contributor

That's a nice improvement. Just thinking about the sense of possible r3.mask.status module.

I am wondering how often users use 3D mask... or maybe more general, how many people work with 3D rasters in GRASS, do you have any idea @wenzeslaus ?

@wenzeslaus
Copy link
Member Author

Handling 3D rasters better would make sense. It's a kind of chicken and egg problem - more tools would lead to more usage, and more usage would lead to more tools. I was quite happy when I used them, but wished for more tools (and added some).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related libraries Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants