Render Tiled JP2s with MRSID SDK enabled GDAL

Simpson asimpson at I-55.COM
Tue Dec 7 15:05:41 EST 2004


After further testing, it may not be related to overviews.  It seems to fail
at most zoom levels.

Here is a GDB backtrace of a shp2img using tile index of jp2s:

#0  0x42028851 in kill () from /lib/i686/libc.so.6
#1  0x4081cf4d in raise () from /lib/i686/libpthread.so.0
#2  0x420284f4 in raise () from /lib/i686/libc.so.6
#3  0x42029beb in abort () from /lib/i686/libc.so.6
#4  0x420219f6 in __assert_fail () from /lib/i686/libc.so.6
#5  0x4050e43a in kdu_codestream::open_tile(kdu_coords) ()
   from /usr/local/lib/libgdal.so.1
#6  0x404b0a1d in kdsd_tile::init(kdu_coords, kdu_codestream,
kdsd_component_state*, bool) () from /usr/local/lib/libgdal.so.1
#7  0x404b2213 in kdu_stripe_decompressor::pull_common() ()
   from /usr/local/lib/libgdal.so.1
#8  0x404b1c74 in kdu_stripe_decompressor::pull_stripe(unsigned char**,
int*, int*, int*, int*) () from /usr/local/lib/libgdal.so.1
#9  0x40497751 in LizardTech::J2KImageReaderImp::doDecodeU8(int,
LizardTech::LTISceneBuffer&) () from /usr/local/lib/libgdal.so.1
#10 0x40497915 in
LizardTech::J2KImageReaderImp::decodeStrip_kak(LizardTech::LTISceneBuffer&,
LizardTech::LTIScene const&) () from /usr/local/lib/libgdal.so.1
#11 0x404976b0 in
LizardTech::J2KImageReaderImp::decodeStrip(LizardTech::LTISceneBuffer&,
LizardTech::LTIScene const&) () from /usr/local/lib/libgdal.so.1
#12 0x4047a160 in
LizardTech::J2KImageReader::decodeStrip(LizardTech::LTISceneBuffer&,
LizardTech::LTIScene const&) () from /usr/local/lib/libgdal.so.1
#13 0x4047f846 in
LizardTech::LTIImageStage::readStrip(LizardTech::LTISceneBuffer&,
LizardTech::LTIScene const&) () from /usr/local/lib/libgdal.so.1
---Type <return> to continue, or q <return> to quit---
#14 0x4047fdae in LizardTech::LTIImageStage::read(LizardTech::LTIScene
const&, LizardTech::LTISceneBuffer&) () from /usr/local/lib/libgdal.so.1
#15 0x4037316c in MrSIDRasterBand::IReadBlock(int, int, void*) ()
   from /usr/local/lib/libgdal.so.1
#16 0x403a7dbb in GDALRasterBand::GetBlockRef(int, int, int) ()
   from /usr/local/lib/libgdal.so.1
#17 0x403aa373 in GDALRasterBand::IRasterIO(GDALRWFlag, int, int, int, int,
void*, int, int, GDALDataType, int, int) () from /usr/local/lib/libgdal.so.1
#18 0x403a77b1 in GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int,
void*, int, int, GDALDataType, int, int) () from /usr/local/lib/libgdal.so.1
#19 0x403ab29b in GDALRasterBand::OverviewRasterIO(GDALRWFlag, int, int,
int, int, void*, int, int, GDALDataType, int, int) () from
/usr/local/lib/libgdal.so.1
#20 0x403aa794 in GDALRasterBand::IRasterIO(GDALRWFlag, int, int, int, int,
void*, int, int, GDALDataType, int, int) () from /usr/local/lib/libgdal.so.1
#21 0x403a77b1 in GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int,
void*, int, int, GDALDataType, int, int) () from /usr/local/lib/libgdal.so.1
#22 0x403a7852 in GDALRasterIO () from /usr/local/lib/libgdal.so.1
#23 0x080b9be1 in LoadGDALImage (hBand=0x832c148, iColorIndex=1,
    layer=0x80f83d8, src_xoff=0, src_yoff=0, src_xsize=3025, src_ysize=7032,
    pabyBuffer=0x832c418
"ÍßÖÞàäÎÆÔÑÂÉÃÎÏÉÍÐָÿÎÅÂÇžÏÄÅÍÔÒÆÚ×ß×ÝÏÈÄвÜËÓË¿ËÆگ͸ÍÍËËÖÜÎØÙÕÚßÞßÝâÚßÊ
ÇÓÒ®âÒØÚÔÚØïµ×ÏÏÏÓÔÇÑÆÚÛÓÖØÄÞàÛÞèÅÀÒÒ¬ÛÚÍ¿ÈÇÌÕ¨ÇÎÀÓÛÇÐÎÉÓÒÕÑ˽×ÒÒÙÊãÉÌÕ°ÜÓÕÁ
ËÊÍàªÓÎËÏÜËËØÊÎÃÕÎÏÓ¹ÅÑÁܹȿµÕÙÉËÈÉÕÝ®½¾Í¹³Ê¼ÂÅÊ"...,
    dst_xsize=34, dst_ysize=81) at mapdrawgdal.c:1089
---Type <return> to continue, or q <return> to quit---
#24 0x080b7cec in msDrawRasterLayerGDAL (map=0x40b72008, layer=0x80f83d8,
    image=0x8141328, hDSVoid=0x8324ac0) at mapdrawgdal.c:724
#25 0x080a8503 in msDrawRasterLayerLow (map=0x40b72008, layer=0x80f83d8,
    image=0x8141328) at mapraster.c:1514
#26 0x0806d691 in msDrawRasterLayer (map=0x40b72008, layer=0x6,
    image=0x80ebae1) at mapdraw.c:1124
#27 0x0806c747 in msDrawLayer (map=0x40b72008, layer=0x80f83d8,
    image=0x8141328) at mapdraw.c:760
#28 0x0806be3b in msDrawMap (map=0x40b72008) at mapdraw.c:425
#29 0x0804e03c in main (argc=14, argv=0xbfffed94) at shp2img.c:220
#30 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Simpson
Sent: Tuesday, December 07, 2004 8:40 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Render Tiled JP2s with MRSID SDK enabled
GDAL


I have an installation of MapServer 4.4.0 using GDAL 1.2.5 on Linux
2.4.20-28.8smp.
The GDAL is compiled with Geo_DSDK-4.0.9.713.
I have a tile index layer of jp2 files that am having trouble rendering at
certain scales.
At a small scale and large scale, the image renders ok, but in between I
get:

mapserv: ../compressed/codestream.cpp:3944: kdu_tile
kdu_codestream::open_tile(kdu_coords): Assertion `(tile_idx.x >= 0) &&
(tile_idx.x < state->num_tiles.x) && (tile_idx.y >= 0) && (tile_idx.y <
state->num_tiles.y)' failed.

I suspect an issue with the overviews in the jp2s:

Band 1 Block=6269x64 Type=Byte, ColorInterp=Red
  Overviews: 3135x3508, 1567x1754, 784x877, 392x439, 196x219, 98x110, 49x55,
24x27, 12x14, 6x7, 3x3

Has anyone had a similar issue or have any suggestions?

Thanks for any help,
Drew.



More information about the mapserver-users mailing list