[Gdal-dev] gdalinfo on JP2 uses 100% of RAM, then crashes
Frank Warmerdam
warmerdam at pobox.com
Fri Nov 17 16:52:26 EST 2006
Patton, Eric wrote:
> I'm trying to convert JP2 to GTiff format. Before I use gdal_translate for
> this, I just want to see the projection info for the JP2. Running gdalinfo
> on the JP2 causes RAM usage to increase to 100%, soon after which "killed"
> is printed to the command prompt.
>
> I can see that JPEG2000 is among the supported formats in my GDAL 1.3.2
> installation:
>
> $ gdalinfo --formats | grep JPEG JPEG (rw): JPEG JFIF JPEG2000 (rw):
> JPEG-2000 part 1 (ISO/IEC 15444-1)
>
> I installed the jasper-1.701-1.uuid.tar.gz package, and it seemed to install
> without errors. However, the GeoJP2 support is conspicuously absent from my
> compile output:
>
> <snip> LIBJPEG support: internal KAKADU support: no JASPER support:
> yes (GeoJP2=no) <snip>
>
> Could that be the problem? If so, is there anything else I need to do during
> ./configure to enable this functionality?
Eric,
In my experience the JasPer based driver uses a lot of memory. It decompresses
the whole image into memory to access it, but in my experience it actually
uses on the order of 10x the memory required to hold the *uncompressed*
image during the decoding process.
I would guess your image is non-trivial in size, and that the driver is
running out of memory during decoding.
I would discourage use of the JasPer based driver except for "consumer sized
images" (ie. from your digital camera) - the task for which the library
was intended.
I would suggest building with the ECW SDK instead for reasonably efficient
jpeg2000 support that will scale up to very large image sizes.
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list