Tiled JPEG-2000 layer
Ed McNierney
ed at TOPOZONE.COM
Wed Sep 22 12:44:56 PDT 2004
Chris -
As Frank Warmerdam has pointed out on the GDAL list, the Jasper library is not very suitable for use in production applications, as it completely decompresses each image into memory during processing. I have not heard any changes in the status of this implementation, and I'd suggest looking to the Kakadu library for production usage and performance.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Chris Hodgson
Sent: Wednesday, September 22, 2004 2:44 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Tiled JPEG-2000 layer
I'm trying to setup mapserver to show a tiled set of jpeg-2000 images. I created the images from tif/wld file pairs using commands like this:
gdal_translate -of JPEG2000 -co "rate=0.1" 92g021_1_alb.tif
92g021_1_alb.jp2
The original files were around 180MB each and they compress to %10 of te original size (as per the specified rate). Then I try to build a tile index for mapserver using:
gdaltindex jp2_tiles *.jp2
and the resulting jp2_tiles.shp file is corrupt in some way - crashes
ArcMap9 and causes JUMP to throw an IndexOutOfBoundsException. It does open in Arcview3, however. I'm not sure if this was a problem for mapserver, but just to make sure I built the tileindex on the tiff files and then did a search/replace in the dbf file (ie. s/\.tif/.dbf/g ).
When I try to look at the layer, even when zoomed in to just a single tile, the mapserver process sucks up 2Gigs of memory and 100% cpu for several minutes before it finally returns the resulting image - and sometimes it doesn't display an image at all (perhaps it times out?).
My layer definition looks like this:
LAYER
NAME "orthophoto_jp2"
METADATA
"wms_title" "orthophoto_jp2"
END
STATUS ON
TILEINDEX "jp2_tiles.shp"
TILEITEM "Location"
TYPE RASTER
PROJECTION
"init=epsg:42102"
END
END
I'm not reprojecting the data, I'm asking for it in the same epsg it is declared to be in.
I'm using a very recently downloaded and compiled:
- MapServer version 4.2.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
INPUT=EPPL7 INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
- GDAL 1.2.1.0, released 2004/06/23
- ftp://ftp.remotesensing.org/gdal/jasper-1.701.0.uuid.tar.gz
One more detail, my original tif files have had several overview layers added using gdaladdo - I don't think that should affect anything but who knows.
Am I doing something wrong here, or is there a know problem with this setup? I don't expect that a dual-3GHz CPU/2GB memory machine should take so long and so much memory to open a shapefile, locate the correct
jp2 file(s) and open and render them...
Chris
More information about the MapServer-users
mailing list