[Gdal-dev] Problems reading georeferenced tiff

Frank Warmerdam warmerdam at pobox.com
Fri May 11 15:40:28 EDT 2007


Asger Sigurd Petersen wrote:
> Dear list,
> 
>  
> 
> I have a tiff with a corresponding tfw file that I would like to warp, 
> but I get the following error:
> 
>  
> 
> C:\gdalwarp" -of GTiff  2007-007_310_0702.tif 2007-007_310_0702-wrp.tif
> 
> Creating output file that is 12632P x 13728L.
> 
> Processing input file 2007-007_310_0702.tif.
> 
> Using band 4 of source image as alpha.
> 
> Using band 4 of destination image as alpha.
> 
> :0...10...20...30ERROR 5: Access window out of range in RasterIO().  
> Requested
> 
> (5081,8284) of size 4611x0 on raster of 11500x7500.
> 
>  
> 
> The weird part is that if I first gdaltranslate the tiff file into a 
> jpeg file and copy the world file accordingly, the jpeg file can then be 
> warped without any problems.

Asger,

I have reproduced your problem.  It is due to the warper computing a source
window that is off the input data file.  It automatically gets trimmed to
zero size, and the general purpose code already ignores requests of zero
size.  But the alpha band reader does not ignore these.

I've fixed this in trunk and 1.4 branch, so the fix should be in the next
FWTools release.  In the meantime, if your workaround of going to jpeg is
ok, then use that.  That works because the alpha band is discarded in jpeg
format.

Or build from source of course.

I'll try to do a new fwtools release in the next week or two.

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list