non-tiff (24 bit?) raster layers in 4.10
Attila Csipa
plists at PROMETHEUS.ORG.YU
Wed May 9 07:29:26 PDT 2007
On Wednesday 09 May 2007 08:00, Rahkonen Jukka wrote:
> can all the drivers handle compressed jpeg2000 in an effective way. You'll
> have something to compare with if you browse your images with kdu_show
> browser. Just as an example, here is a parameter set for kdu_compress that
> should result in pretty fast browseable, in this case lossless jpeg2000
>
> kdu_compress -i infile.tif -o outfile.jp2 -rate - Clevels=7 Clayers=20
> Creversible=yes Cycc=no Cprecincts={256,256},{128,128} Corder=RPCL
> Cblk={32,32} ORGgen_plt=yes ORGgen_tlm=8 ORGtparts=R -cpu 0 -mem
I did play around with Clayers and Clevels, I originally missed Corder,
retried now with it but it had no apparent impact on .jp2 performance under
Mapserver :( This is what I get with a single layer, with just one tile in it
(zoomed out to around a 100x100 pix resulting tile in the image).
time shp2img -m jp2test.map -o /tmp/aaa.png
GDAL: GDALClose()
JPEG2000: IHDR box found. Dump: width=5000, height=5000, numcmpts=3, bpp=8
JPEG2000: Component 0: bpp=8, signedness=0
JPEG2000: Component 1: bpp=8, signedness=0
JPEG2000: Component 2: bpp=8, signedness=0
GDAL: GDALOpen(/ortofoto/75790_48000.jp2) succeeds as JPEG2000.
GDAL: GDALClose(/ortofoto/75790_48000.jp2)
GDAL: GDALDeregister_GTiff() called.
real 1m9.276s
user 0m33.546s
sys 0m3.524s
So it seems to me no overviews or similar format inherent options were
actually used. The odd thing is that mapserver/gdal/jasper/whoever spent half
of the time outside of userspace, possibly mucking around on the disk
(the .jp2 file itself is ~16MB).
Unfortunately I don't have kdu_show at hand (no windows boxen on the site :
( ), but using kdu_render it DOES go much, much faster (takes less than 10
sec for rendering the whole 5000x5000 file into a bmp).
> Sorry, but I did not understand this part totally, could you clarify a bit?
>
> >kde_compress only kept the first image if there were multiple no
> >matter what I did
for example 'identify 75790_48000_i.tif' gives:
75790_48000_i.tif[0] TIFF 5000x5000 DirectClass 78.3mb 0.700u 0:11
75790_48000_i.tif[1] TIFF 2500x2500 DirectClass 78.3mb 0.380u 0:09
75790_48000_i.tif[2] TIFF 1250x1250 DirectClass 78.3mb 0.070u 0:03
75790_48000_i.tif[3] TIFF 625x625 DirectClass 78.3mb
75790_48000_i.tif[4] TIFF 313x313 DirectClass 78.3mb
since tif is a container format. The trouble is that the other images are not
necessarily overviews, they can be specific thumbnails, etc. When I do a
kdu_compress on such a file, the result will be a _single_ JPC image in the
tif. There might of course be a magic option for it in the jungle of
kakadu/jp2 options, but have not run across it.
More information about the MapServer-users
mailing list