[Gdal-dev] Warping an ecw

David McKenzie davidmck at austin.rr.com
Tue Nov 15 08:24:03 EST 2005


Hi Folks,

Frank Warmerdam wrote:
> ....
> I have submitted a bug report to ERMapper where I had crashes in
> the ECW SDK when doing many small windowed reads on a large
> file.  I haven't heard back if they were able to reproduce it.   You
> might be running into something similar.
> ...

I had been intending to report a similar problem I encountered with ECW SDK
v3.3 RC1 (and possibly an earlier version). GDAL's RasterIO() fails on the
second band when reading multiple bands in succession -- but only if the
window width is *larger* than 4000 pixels. I found that I could resolve the
problem by initializing a variable, m_nNextLine, in function
CNCSJP2FileView::SetView(). In file NCSJP2FileView.cpp (line 940) you might
try replacing

if (m_pECWFileView) {
CNCSError Error;

with

if (m_pECWFileView) {
m_nNextLine = 0;
CNCSError Error;

Without this fix, CNCSJP2FileView::ReadLineBIL() inevitably returns
NCSECW_READ_FAILED with at least two large images I've experimented with.

--David




More information about the Gdal-dev mailing list