[gdal-dev] gdal_retile.py killed when dealing with large .vrt + pixel function

วีร์ ศรีทิพโพธิ์ wee.s at forest.go.th
Wed Sep 4 09:46:23 PDT 2019

Hi Even,

Thanks for your kindly attention. I'm sad that I couldn't provide you a proper material to reproduce the issue (since I didn't own them).

But I think I just found the cause of this problem - lack of memory.

>From your suggestion about using a debugger, I searched the internet and found out that I could pass '--debug ON' to every gdal commands. After I passed the option, more info are displayed:

GDAL: GDALDriver::Create(Memory,TileIndex,0,0,0,Unknown,(nil))
GDAL: GDALOpen(test_sum.vrt, this=0x2b10bc0) succeeds as VRT.
GDAL: GDALClose(test_sum.vrt, this=0x2b10bc0)
Building internal Index for 1 tile(s) ... finished
GDAL: GDALOpen(test_sum.vrt, this=0x2b10bc0) succeeds as VRT.
Filename: test_sum.vrt
File Size: 1178083x2179667x1
Pixel Size: 0.780877 x -0.780877
UL:(10841319.553138,2329047.665115)   LR:(11761257.511933,626995.763142)
tileWidth:   2048
tileHeight:  2048
countTilesX: 576
countTilesY: 1065
overlap:     0
GDAL: GDALDriver::Create(Memory,TileResult_0,0,0,0,Unknown,(nil))
GDAL: GDALDriver::Create(MEM,TEMP,2048,2048,1,Byte,(nil))

The script was killed after some message about 'memory', so I monitored my system's memory while running the script. The script gradually consumed my 8GB RAM then my 4GB swap before being killed.

I'll try to increase the memory/swap and report back.

Thank you,

More information about the gdal-dev mailing list