[Gdal-dev] Ecw resampling problem when reading region larger
than output buffer?
Frank Warmerdam
warmerdam at pobox.com
Wed Apr 5 10:12:14 EDT 2006
Asger Petersen wrote:
> 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,
What version of GDAL are you using? Hopefully at least 1.3.1? There was
a bug in the past with supersampling, as it had to be implemented as a
specific case with GDAL doing the oversampling as the ECW SDK did not
support returning supersampled images. It is quite plausible that there
are still some problems in this in fairly specific cases.
If you still have this problem with at least GDAL 1.3.1 (or better yet
a recent CVS snapshot), and if you file a bug report with the details
and a pointer to an image on which it can be demonstrated I'll dig into
it.
The c# shouldn't be an issue so providing just the C# rasterio call
should be sufficient. I just want to ensure I am trying to reproduce
it against the same image at my end as you ran into the problem with.
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 OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list