Gdal Bug? was: Re: [gdal-dev] JP2MRSID Issues

Frank Warmerdam warmerdam at
Wed Nov 12 21:56:28 EST 2008

Stephen Woodbridge wrote:
> Frank, anyone,
> Thoughts on this issue?
> Thoughts on how to better diagnose the issue?
> I can talk to the client about making an image available to someone if 
> that would help.
> I'm totally stuck on this one, converting 300+ images to tif first at 
> 2-3 hours per image is not going to hack it.
>>> gdalwarp: ../compressed/compressed.cpp:1724: bool 
>>> kd_tile::read_tile_part_header(): Assertion `tpart_body_length >= 0' 
>>> failed.


As I understand it, the problem you see is that under some access
arrangements you are getting this kd_tile assertion from the JP2MRSID
driver.  Is that right?  I'm not familiar with this error, and it is coming
from deep inside the MrSID SDK (in fact within the subcomponent that is
derived from the Kakadu library as we can see from the names).

My impression is that to make any progress you would need to supply
a sample that demonstrates the problem.  At that point I could try and
diagnose if I'm doing something boneheaded.  If nothing is apparently
someone would need to bounce the issue (hopefully with a narrow example
program operating directly against the MrSID SDK) to Lizardtech for further

No offense to Lizardtech - we have vaguely similar issues with ECW,
and Kakadu too - but it is just hellish to diagnose some of these problems
deep in proprietary and/or complicated sub-libraries.  I find it hard to
bring myself to even dig into such issues unless a paying client makes me
do it, though I'd be willing to make a quick try for you if there was an
easy way for me to try.

PS. My daily download limit via my satellite ISP is 500MB and I don't want
to use it all up on a single jp2 file.  Please try to reproduce the issue
with a small file.

PPS.  I don't understand your point where you seem to suggest that converting
to tiff first is slower than other mechanisms.  Are you suggesting it takes
2-3 hours to convert a 500MB jpeg2000 image to GeoTIFF?  Perhaps you need
to up your GDAL block cache size?

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at
light and sound - activate the windows |
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list