<div dir="ltr">Hi,<div><div><br></div><div>I have a set of .jp2 files (orthophotos) which I want to use in Geoserver. All the files are around 24,5 Go. </div><div><br></div><div>I transform all the .jp2 files in a .vrt :</div><div>gdalbuildvrt D:\ortho\ortho.vrt -srcnodata 255 -hidenodata D:\ortho\2020\*.jp2<br></div><div><br></div><div>Then I launch a gdaladdo on the .vrt. The .ovr file created is around 11,9 Go :<br></div><div>gdaladdo --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL -r average 

D:\ortho\ortho.vrt

 2 4 8 16 32 64<br></div><div><br></div><div>At the step of gdal_retile, I launch this command in GDAL 2.4.4 :</div><div>python gdal_retile.py -v -r bilinear -levels 4 -ps 2500 2500 -co "COMPRESS=JPEG" -co "TILED=YES" -targetDir D:\ortho\tiles D:\ortho\ortho.vrt

<br></div><div><br></div><div>The program runs well (20440 tiles created) till an error message appears :</div><div>ERROR 1: Not enough memory to decode tile <br><br>ERROR 1: opj_decode() failed <br>ERROR 1: D:\Donnees\bd_ortho\2020\25cm\07-2020-0785-6420-LA93-0M20-E080.jp2, band 1: IReadBlock failed at X offset 0, Y offset 0: opj_decode() failed D:\Donnees\bd_ortho\2020\25cm\07-2020-0785-6420-LA93-0M20-E080.jp2, band 1: IReadBlock failed at X offset 0, Y offset 0: opj_decode() failed <br>Traceback (most recent call last): <br>     File "gdal_retile.py", line 1022, in <module> <br>                sys.exit(main(sys.argv)) <br>     File "gdal_retile.py", line 929, in main <br>           dsCreatedTileIndex = tileImage(minfo, ti) <br>    File "gdal_retile.py", line 358, in tileImage <br>              createTile(minfo, offsetX, offsetY, width, height, tilename, OGRDS) <br>  File "gdal_retile.py", line 502, in createTile <br>             dec.uly + offsetY * dec.scaleY) <br>      File "gdal_retile.py", line 269, in getDataSet <br>             t_band.WriteRaster(tw_xoff, tw_yoff, tw_xsize, twysize, data) <br>        File "C:\Users\SIG-Pierre\AppData\Local\Programs\Python\Python37\lib\site-packages\osgeo\gdal.py", line 2381, in Write Raster <br>              return _gdal.Band_WriteRaster(self, *args, **kwargs) <br>TypeError: not a unicode string or a bytes<br></div><div><br></div><div>My computer is on Windows 10 (20H2), Intel core i7 and 16 Gb RAM.</div><div><br></div><div>Is there a problem with my computer (not enough RAM as the error message says) or is there a problem in my "gdal_retile" command ? I am listening if you have some advices.</div><div><br></div><div>Pierre</div></div></div>