Saul Farber a écrit :
> I've got a float-denominated elevation-model raster with values that are
> "geophysics" values, not image values.  From what I can tell, in order
> to handle float-backed rasters, java wants the floats to be normalized
> (mapped into the interval [0.0,1.0]) in some manner.

This is the default behavior, but actually Java2D can render a float image for 
any intervale providing that we tell him what the interval is. You need to 
create a ColorSpace subclass with getMinValue(int) and getMaxValue(int) method 
overloaded:

http://java.sun.com/javase/6/docs/api/java/awt/color/ColorSpace.html#getMinValue(int)

We did that in GeoTools. There is a ScaledColorSpace (or ScaledColorModel - I 
don't remember the exact name) somewhere. It work as expected, but the drawing 
is much slower than usual images. But at least it work...

When creating a GridCoverage2D from a float raster, the constructor 
automatically uses the information provided in the Category objects (if 
present) 
for automatically assign such scaled color space. If not presents, current 
implementation scans the raster in order to find min and max values (but there 
is a JIRA task against that since it may be slow, so it may change. I have not 
yet investigated this issue).

        Martin

-------------------------------------------------------------------------
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