[FWTools] JP2k code stream error

Frank Warmerdam warmerdam at pobox.com
Wed Apr 30 18:34:54 EDT 2008


Shaun Kolomeitz wrote:
> I am attempting to resample an Image provided in JPEG2000 format, provided
> by an external provider, but keep coming across the following error. Can
> anyone suggest how I could resample or "switch file seeking to disabled"
> please ? (I am unable to even read a small area of the image as shown below)
> 
> 
> $ gdal_translate -of hfa -srcwin 0 0 100 100 North_Queensland_25x.jp2 
> /tmp/test1.img Input file size is 190000, 390000 0ERROR 1: Kakadu Error: 
> Tile-part holds some but not all the packets of a precinct for which PLT 
> information is being used to extract precinct addresses for random access.
> In particular, the current tile has its packets sequenced so that all
> packets of any given precinct appear consecutively and yet a tile-part
> boundary has been inserted between the packets of a precinct. While this is
> not illegal, it indicates very poor judgement in the placement of tile-part
> boundaries.  To process this code-stream, you will have to open it again
> with file seeking disabled. ERROR 1: IReadBlock failed at X offset 0, Y
> offset 0 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0 
> Open GDAL Datasets: 1 N HFA    100x100x3 /tmp/test1.img

Shaun,

I don't suppose you can make a reasonably sized file available that
demonstrates this problem?

My first suggestion would be to disable the JP2KAK driver, and see if
another JPEG2000 driver (ECW or MRSID based) does better.

eg.

export GDAL_SKIP=JP2KAK
gdal_translate -of hfa -srcwin 0 0 100 100 North_Queensland_25x.jp2

I'm not really aware of a mechanism to open files "non-seeking"
with Kakadu.

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 OSGeo, http://osgeo.org



More information about the FWTools mailing list