Anaxa Gore a écrit :
> I want to reproject a GridCoverage2D.
> My problem is : when the reprojection is processing, I get an exception 
> because of negative values in my GridCoverage2D. As I don't need them, I 
> would like to put some 0 instead of negative values, but I can't find 
> any information on this topic.
> I saw in the javadoc that some setDataBlok() methods exist, but I can't 
> understand how do they work and if it was what I was searching for...
> Somebody can give me an idea or a piece of code ?

As far as I remember the setDataBlock() methods are not implemented and may be 
removed in a future version. Modifying a data in a GridCoverage2D is modifying 
pixel values in a WritableRenderedImage.

I could give you some tips (basically I suggest to use JAI iterators). However 
before to do so, I wonder why you get an exception will reprojecting. I would 
expect the reprojection to work even with negative values. Which code are you 
using for reprojecting?

        Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to