Tiled JPEG-2000 layer

Frank Warmerdam warmerdam at POBOX.COM
Wed Sep 22 12:57:50 PDT 2004


Chris Hodgson wrote:
> 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 ).

Chris,

I hope you mean you changed ".tif" to ".jp2".  There are two issues here.
One is that gdaltindex produced a shapfile that is corrupt in some fashion.
I would like to investigate that.  Could you submit a GDAL bugzilla entry
including the index files that are causing the problems?  Also, if you can
easily determine why jump considers them corrupt that would be good to know
too.
...
> 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...

As Ed mentioned, the JasPer driver is inappropriate to use for such large
chunks of imagery.  In my experience the JasPer implementation actually
uses alot more RAM than the decompressed image while working.  In addition
to Kakadu, you could also look at using the ECW 3.0 SDK (if on Windows) or
the MrSID SDK, if you happen to have that, for JPEG2000.  There are *too
many* options!

If you can split your tiles into much smaller chunks (say - 5MB uncompressed)
then the JasPer implementation might be fine.

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    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list