[Geotiff] How to read the pixel value (color) in a GeoTiff

Frank Warmerdam warmerdam at pobox.com
Tue Apr 7 12:20:10 PDT 2009


Craig Fournier wrote:
> What is the best tool to use to read the pixel value (color) at a 
> particular latitude and longitude in a GeoTiff file?  I am working in 
> Java and prefer a Java solution, but can also use C code.  The routines 
> I see, allow for reading the header and translating image files from one 
> format to another.  I just need a small fast read routine to read a file 
> on disk and return the pixel value.  I don’t want to hold this file in 
> memory as it is a large file. 

Craig,

The GeoTools Java library includes GeoTIFF support, and it should be possible
to do what you want.

   http://www.geotools.org/

It can also be accomplished with the GDAL C++ library which includes Java
bindings.

   http://www.gdal.org/

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Geotiff mailing list