Question

I'm using python and gdal to do some image processing for Landsat satellite imagery Essentially, I'm trying to convert the iamges to Tasseled Cap, but generally I am reading 7 arrays of int 16 that are 7281 x 8051 size renamed bands 1-5 and band 7, and fmask. fmask is a mask band of 0's and 1's.

 brightBand=( .2043*band1 + .4158*band2 + .5524*band3+.5741*band4+.3124*band5+ .2303*band7)*fmask
 greenBand=( -0.1603*band1+ -.2819*band2 + -.4934*band3 + .7940*band4 + -.0002*band5 + -.1446*band7)*fmask
 wetBand=( .0315*band1 + .2021*band2 + .3102*band3 + .1594*band4 + -.6806*band5 + -.6109*band7)*fmask

i can import the bands as int 16, not as float 32, but as soon as I try to do the operation above i receive a "Memory Error" message. I am using Spyder/Python 2.7 and the right python bindings. I have 64 GB of ram, but con only seem to use up to 2 or 8. I'm also using 32 bit python and gdal. Any ideas?

Was it helpful?

Solution

How would you address more than 4gb with 32bit process? In fact, usually you are limited with 2Gb. It might be configured to be more on unix machines, but on windows, 32bit processes are always limited with 2Gb.

Switch to 64bit python instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top