[gdal-dev] Translating from to JPEG2000 to ECW

Even Rouault even.rouault at mines-paris.org
Wed Apr 7 17:59:41 EDT 2010


Several potential issues :
* the unit of GDAL_ECW_CACHE_MAXMEM is in bytes, not megabytes. So I suspect 
500 can cause problems. It is probably much too low for ECW SDK to work 
properly. Or it may also decide to use its default value, which is 1/4 of the 
total RAM
* GDAL_CACHEMAX=2500 is a too bigger value. The max cache size is stored as a 
signed integer, so the maximum supported is 2 GB.
* And 500 MB + 2500 MB would be your total RAM, which is not reasonable. You 
must live some free RAM for your OS...

You can also try a more recent FWTools release. Latest is 2.4.7

Le Wednesday 07 April 2010 14:51:30 Wickes, vous avez écrit :
> I've got a problem translating a large JPEG2000 image to ECW. I'm using:
> gdal_translate -of ECW -co "LARGE_OK=YES" input.jp2 output.ecw
>
> Shortly after 10% of processing I get some sort of memory error. The gist
> of it is:
> ECW Exception
> An Access Violation Exception occurred at code address 0x4a4d64 attempting
> to READ from memory address 0x0.
> Dump: {large string of characters}
> Strack Trace:
>
> I've tried adding in various switches including --config GDAL_CACHEMAX 2500
> and --config GDAL_ECW_CACHE_MAXMEM 500 to try and limit the amout of memory
> with no success.
>
> Has anyone got any suggestions why this might be? The image is around 300Mb
> as JP2 (size approx: 40000x 40000) and came from ENVI (highly compressed).
> I'm on XP, using 3Gb of RAM and using FWTools 2.3.0 (GDAL 1.7).
>
> Thanks




More information about the gdal-dev mailing list