Read in blocks (multiple of image's internal BlockXSize x BlockYSize, typically 256x256) instead of reading the whole image at once so the whole uncompressed image doesn't need to fit into memory. Balance large block sizes (for efficiency) with reasonable memory usage. Probably blocks of 1024x1024 to 8192x8192 would be reasonable.
|
data_array = band.ReadAsArray() |
Read in blocks (multiple of image's internal BlockXSize x BlockYSize, typically 256x256) instead of reading the whole image at once so the whole uncompressed image doesn't need to fit into memory. Balance large block sizes (for efficiency) with reasonable memory usage. Probably blocks of 1024x1024 to 8192x8192 would be reasonable.
setsm_postprocessing_python/batch_check_setsm.py
Line 2089 in 8b117d6