[Gdal-dev] VRTWarpedDataset w/ -dstalpha

Dardo D Kleiner - CONTRACTOR dkleiner at cmf.nrl.navy.mil
Fri May 20 16:14:51 EDT 2005


> Hmm, this sounds like a bug.  If you can submit sufficient details in
> Bugzilla I would hope to dig into it. 

Done.  So how about my first problem regarding the use of '-co ALPHA=YES
-dstalpha' when creating VRTWarpedDatasets?  I keep getting unexpected results
in attempts at reading from the resulting .vrt file, and haven't managed to
nail down a clean bug case.  Things like if the BlockX/YSize isn't a multiple
of the dataset size, I get errors like:

Input file size is 600, 600
0.ERROR 6: WriteBlock() not supported for this dataset.
ERROR 5: Access window out of range in RasterIO().  Requested
(512,0) of size 512x128 on raster of 600x600.
ERROR 1: IReadBlock failed at X offset 1, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 1, Y block offset 0
ERROR 6: WriteBlock() not supported for this dataset.

But specifying block size in the gdalwarp command doesn't seem to work (using
'-co BLOCKXSIZE <x> -co BLOCKYSIZE <y>', the resulting .vrt always has 512/128.

And putting it all together, as in:
'-co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co ALPHA=YES -dstalpha'

causes:

Program terminated with signal 11, Segmentation fault.
.
.
.
#0  0x41afd04c in _int_free () from /lib/tls/libc.so.6
#1  0x41afc01b in free () from /lib/tls/libc.so.6
#2  0x40174f01 in VSIFree () from /afs/cmf/project/gis/lib/libgdal.so.1
#3  0x401736cd in CSLDestroy () from /afs/cmf/project/gis/lib/libgdal.so.1
#4  0x0804a33c in main ()

If I hand-edit the file to make it a solid multiple, it doesn't break, but I
still get a whole bunch of "ERROR 6: WriteBlock() not supported for this
dataset" errors.  I can't yet verify whether or not the output alpha channel is
getting the right values for the "warp border" - In a test that uses a "real"
projection, like I mentioned originally, all I can say right now is that 
I get all those ERROR 6's and the output image is excessively blue.

Any ideas?  I'll keep at trying to reduce it to a simple case, but if you have
any suggestions that would be great!
- Dardo




More information about the Gdal-dev mailing list