[Gdal-dev] Ecw resampling problem when reading region larger than output buffer?

Asger Petersen asger at jo-informatik.dk
Wed Apr 5 09:50:22 EDT 2006


Hi list

I get funny results when using RasterIO to read a region from ECW that is larger than the outputbuffer ie doing super sampling.

When the output buffer is same size or smaller than the read region everything is fine. When output buffer is larger than the read region I get a result where the number of lines in the output seems to be fine but the number of pixels is 1/3 of what is should be (see attached files).

I've tried different formats and this only happens with ecw.

Oh, and to complicate things a bit I'm using Simon Perkins' .NET bindings.
Works:
band.RasterIO(Gdal.RWFlag.Read, 4000, 4000, 351, 351, data, 351, 351, Gdal.DataType.Byte, 3, 1056);

Doesn't work:
band.RasterIO(Gdal.RWFlag.Read, 4000, 4000, 351, 351, data, 352, 352, Gdal.DataType.Byte, 3, 1056);

Isn't it possible to get GDAL to supersample from ecw files?

Asger Petersen
JO Informatik ApS
Allégade 2, Bygning 10
3000 Helsingør
Tlf 49 20 20 67

-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_351_into_352.jpg
Type: image/jpeg
Size: 9363 bytes
Desc: read_351_into_352.jpg
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060405/16100fac/read_351_into_352.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_351_into_351.jpg
Type: image/jpeg
Size: 18370 bytes
Desc: read_351_into_351.jpg
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060405/16100fac/read_351_into_351.jpg


More information about the Gdal-dev mailing list