Yang,
This isn't really a geotools solution, but one way is to use the data
buffer from your image:
// read your image into a BufferedImage, e.g.,
BufferedImage bufferedImage = ImageIO.read(new File("/path/to/file.tif"));
// get the data buffer
DataBuffer db = bufferedImage.getData().getDataBuffer();
// you can then read each element in the buffer using its index
// (reading them as ints...)
int value = db.getElem(0);
Hopefully this gets you started (perhaps there are less
memory-intensive and/or geotools-specific ways as well...).
Kevin
On Nov 8, 2007 2:58 AM, Mwhei <[EMAIL PROTECTED]> wrote:
>
> Hello dear sir,
> I have a question to consult you.I donnot know how to read every pixs'
> value from a geotiff file.Would you please give me some suggestion?Thank you
> very much!
>
> Sincerely yours,
>
> Yang
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users