[Gdal-dev] JPEG2000

Simpson asimpson at i-55.com
Wed Dec 8 20:07:30 EST 2004


I am looking for a FREE JP2 compressor/decompressor too and it seems to be
like a quest for the holy grail.

Kakadu is anything but free, unless I misunderstood their licensing
information.

The MrSid SDK is free and is fast, but via Mapserver->Gdal->MrSid SDK it
crashes intermittently.  I have posted to Mapserver group with no response
yet.  Not sure if it is something in the encoding of the source files or
not.

Jasper is free and stable, but as I have it configured, too memory
consumptive and slow for serving data over the Web.

If the elusive free JP2 solution is out there, I haven't found it yet.

Drew.


P.S. Here is a GDB backtrace of a Mapserver 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: gdal-dev-bounces at xserve.flids.com
[mailto:gdal-dev-bounces at xserve.flids.com]On Behalf Of Chris Hodgson
Sent: Wednesday, December 08, 2004 3:28 PM
To: Jim LeMieux
Cc: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] JPEG2000


Have a look at the output of:

# gdalinfo --format JP2KAK

and cross-reference it against:

http://www.kakadusoftware.com/Usage_Examples.txt

I don't know about your motivation for converting - however, I found
that creating lossy files at about 1/10 the size of a GeoTiff were
visually identical. I used the following options to gdal_convert to get
this sort of output:

-co 'Clayers=20'
-co 'Clevels=8'
-co 'Corder=RPCL'
-co 'Cprecincts={256,256},{256,256},{128,128}'
-co 'ORGgen_plt=yes'
-co 'Creversible=no'
-co 'quality=10'

Note that decompression is very fast for a single user - however, I
tried to build a multi-user mapserver using jp2k files and it just
wasn't viable for me.

Good luck with it.

Chris

Jim LeMieux wrote:

> Hello I was trying to use OpenEV to convert a GeoTIFF to a JPEG2000
> (Kakadu version apparently) and It works using the Export utility,
> however the quality is degraded significantly and there are no options
> to set the compression. I tried the gdal_translate at the command line
> and got the same results (didn’t find any command line options to set
> compression). I’m looking to find a free compressor to compress all my
> GeoTIFFs to JPEG 2000 format at the lossless rate.
>
> Any suggestions?
>
> THANKS in advance.
>
> Jim LeMieux
>
> Kalispel Tribe
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at xserve.flids.com
>http://xserve.flids.com/mailman/listinfo/gdal-dev
>
>

_______________________________________________
Gdal-dev mailing list
Gdal-dev at xserve.flids.com
http://xserve.flids.com/mailman/listinfo/gdal-dev






More information about the Gdal-dev mailing list