[gdal-dev] GDAL (via Java bindings) and ECW

Greg Coats gregcoats at mac.com
Thu Nov 18 10:54:51 EST 2010


>From a JPEG2000 image, you can use kdu_expand -reduce to quickly extract an image of the top (or any other) level pyramid. In the example below, I extract from a JPEG2000 image, pyramid level 10 from a 142 GB image in 0.10 seconds. Perhaps you could consider using JPEG2000.
Greg

$ ls -hl dcua0171_BigTiffYes.tif dcua0171_BigTiffYes_rev.jp2
  142G Feb 16  2010 dcua0171_BigTiffYes.tif
   58G Feb 16  2010 dcua0171_BigTiffYes_rev.jp2
$ /usr/bin/time $kdu_expand -i dcua0171_BigTiffYes_rev.jp2 -o reduce10.tif -reduce 10
Copying Geo  box info, size =     387
        0.10 real         0.08 user         0.02 sys
$ ls -hl reduce10.tif
  143K Nov 18 10:37 reduce10.tif

On Nov 18, 2010, at 10:24 AM, Ronan Crowley wrote:

> Hi All,
> 
> I'm using GDAL (via Java) to view an ECW file.
> 
> It generally works fine, however I'm having serious memory issues.
> 
> I have a 6MB ECW file, that when I try to view in its entirety I get OutOfMemory errors.
> 
> The code I'm using to extract the image is pretty much the code from the GDALtest.java file in the swig sub-project.
> 
> What I'm wodering, is if there is any way to get the number of pyramid levels inside the image and grab the top-most pyramid level image ?
> 
> Thanks,
> Ronan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101118/a4f65906/attachment.html


More information about the gdal-dev mailing list