AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.07.16 08:24 "[Tiff] How to get the image data given that its position rectangle is known", by yanjianfeng
2004.07.16 13:51 "Re: [Tiff] How to get the image data given that its position rectangle is known", by Frank Warmerdam

2004.07.16 13:51 "Re: [Tiff] How to get the image data given that its position rectangle is known", by Frank Warmerdam

In a Tiff file, I want to get the image data in a given rectangle(the Rectangle's location is known: Begining ordinates in the Tiff file and width, height of the range),Then I can put all the data into an Array to process them.

Is there any relative tools or functions available to solve the problem?

Hi,

Libtiff does not provide a simple function to accomplish what you want. It can be done, but you will likely have to have a bunch of logic to collect your desired window from all strips or tiles touching the window.

Alternatively you can use a higher level library to provide windowed access. I maintain a library aimed at geospatial applications of raster data which can do this (GDAL - http://www.remotesensing.org/gdal) but there are others out there as well.

Best regards,

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