[EMAIL PROTECTED] a écrit : > I need a matrix like object to do operations with the comlete grid.
Isn't RandomIter close enough, especially its getSample(x,y,b) method? http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs/javax/media/jai/iterator/RandomIter.html#getSampleDouble(int,%20int,%20int) If you really need the data as an array, then there is a choice: 1) Get a copy of the data as you did. or 2) Get a direct reference (without copy) to the underlying data as in: float[] data = coverage.getRenderedImage().getRaster().getDataBuffer().getData(); but this is complicated (I omitted the various cast in the above line; cast to BufferedImage, cast to DataBufferFloat... In a real work we may have to check the type and performs various choices accordingly) and you have to compute yourself the index in the array of a (x,y) coordinates (yet more complicated if the image is tiled). Martin ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
