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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Craig Fournier

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. 


_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: How to read the pixel value (color) in a GeoTiff

Frank Warmerdam
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, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff