Hy guys,
I am slowly moving towards the end of the refactor for the SLD 1.0
RasterSymbolizer work we have put together for geotools and geoserver.
There is however an issue on which I would like to have some feedback
from the community.
Inside the streaming renderer we usually draw on an ARGB
BufferedImage, which is the place where we fuse images taken from
rendering different layers. Now the RasterSymbolizer strives to
produce an ARGB or AGray image, but still there can be some
combinations for the RasterSymbolizer elements for which we can get
images that have like 7 bands or images with just one band but with
negative values. Well, java2d chocked when you try to overlay pixels
with negative values on an RGB image (things are a little bit more
complex than that, but anyway, if anyone is interested he can find
more info online).

My question is the following. How would like this situation to be
handled ?(if you think we should handle it at all, alternative is just
let java2d spit an obscure exception and have users come back to us
with strange questions :-)).

During years I hve used various various solutions in other projects:

1>select 1-2 (gray or gray alpha) or 3-4 (rgb or rgba) bands then  clamp to byte
2>select 1-2 (gray or gray alpha) or 3-4 (rgb or rgba) bands the
autorescale to byte (do a linear mapping from the original image range
to a byte range)
3> choke with a nice message


Preferences? Different approaches?



Thx,
Simone.
-- 
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it

-------------------------------------------------------

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to