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

Alpha parameter not always working in mf_raster() #78

Open
MayeulDvl opened this issue Nov 5, 2024 · 4 comments
Open

Alpha parameter not always working in mf_raster() #78

MayeulDvl opened this issue Nov 5, 2024 · 4 comments

Comments

@MayeulDvl
Copy link

Hi,
I display a picture from the french BD_ORTHO as the background of my map.
It is a raster I get from happign (happign::get_wms_raster(...)), so I guess it doesn't have a hcl.colors palette when displayed with mf_raster().
The alpha parameter has no impact on the opacity of that layer.
Is it possible to change that behavior ? Is there another way to change the alpha ?
Thank you,
Mayeul DUVAL

@rCarto
Copy link
Member

rCarto commented Nov 5, 2024

Hi,
For the moment, it is not possible to use alpha mf_raster() in without using a palette name from hcl.colors() (so only single band raster).
A solution would be to use terra::plotRGB() instead (that doesn't work either, I'll have a look at it).

@MayeulDvl
Copy link
Author

Ok, I'm waiting for you if you find a way to make it work.

@rCarto
Copy link
Member

rCarto commented Nov 14, 2024

The dev version of terra has a fix to set the transparency for raster. (see rspatial/terra#1642)
The next release of mapsf will allow to use transparency more easily in mf_map() and mf_raster().

@MayeulDvl
Copy link
Author

Great !
I'm waiting for it then. Where do you annonce new releases ?

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

No branches or pull requests

2 participants