color map with gray scale + alpha

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

color map with gray scale + alpha

Anna Amat

Hi list,

I'm facing the problem of setting a color map in a 2 band (grayscale + alpha raster). I found this entry here :
but I don't understand what it means by : "Just relax it so that the color map is applied to the gray part in case the second band is alpha"

Do I have to set 0 value to transparent? In this case pixels with 0 in the gray band would also become transparent and this is not the behaviour I want.

Thanks in advance,
Anna.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: color map with gray scale + alpha

jody.garnett
I think you are reading a bug repot, so Andrea is describing what geoserver should do to fix the problem internally. Perhaps the code was only ever tested with single band data like a DEM before so this is a new feature being requested.

--
Jody Garnett

On 16 June 2017 at 01:48, Anna Amat <[hidden email]> wrote:

Hi list,

I'm facing the problem of setting a color map in a 2 band (grayscale + alpha raster). I found this entry here :
but I don't understand what it means by : "Just relax it so that the color map is applied to the gray part in case the second band is alpha"

Do I have to set 0 value to transparent? In this case pixels with 0 in the gray band would also become transparent and this is not the behaviour I want.

Thanks in advance,
Anna.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: color map with gray scale + alpha

Anna Amat

Thanks Jody,

I ended up changing the band type from UInt8 to Int16 and using a negative value to store the null (transparent) values. I don't know if its the more efficient way but its the only solution I could come up with.


Anna.

2017-06-27 19:45 GMT+02:00 Jody Garnett <[hidden email]>:
I think you are reading a bug repot, so Andrea is describing what geoserver should do to fix the problem internally. Perhaps the code was only ever tested with single band data like a DEM before so this is a new feature being requested.

--
Jody Garnett

On 16 June 2017 at 01:48, Anna Amat <[hidden email]> wrote:

Hi list,

I'm facing the problem of setting a color map in a 2 band (grayscale + alpha raster). I found this entry here :
but I don't understand what it means by : "Just relax it so that the color map is applied to the gray part in case the second band is alpha"

Do I have to set 0 value to transparent? In this case pixels with 0 in the gray band would also become transparent and this is not the behaviour I want.

Thanks in advance,
Anna.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users