GDAL multiple raster files load problem, will 64bit solve the problem?

Nov 8, 2012 at 1:20 PM

Dear all

I am experiencing a problem with loading multiple raster files with GDAL.

What I have seen is that, loading a very large .asc file is not a problem (12000x10000 rough dimensions), but if instead I try to load several smaller raster maps (say 6000x4000 cells) it turns out with an error message like "parameter is not valid".

I guess it has something to do with memory errors, but I don't understand why a single large file is loaded while a number of smaller (in sum) rasters gives this error.

I have to say that I don't know much about data visualization, so forgive me if the following question sound silly to you:

1)is there a way not to load the rasters into memory and to create a sort of light weight visualization image to show on the map, while maintaining a sort of connection between the map display and the source raster file to eventually load or recover the data if needed by any algorithm?

2) if I remove a layer from the map, will the previously used memory be released?

3)if working with 64bit OS, and compile my program 64bit will I be able to avoid memory problems? I read some discussions about 64bit GDAL, but I didn't understand how to recompile the libraries for x64, did someone tried to do it? Can he share with me the 64bit compiled Otherwise, can he guide me through the compilation process? I have free microsoft visual studio express (C#) and it seems it does not give me the possibility to compile 64bit, do I need a pro version of the compiler? 

Hope I have been clear in my questions

Thank you 


Nov 9, 2012 at 8:53 AM


regarding point 2 in my first message, it seems that the memory is not automatically released.

What I am seeing is that after getting the "parameter is not valid" message while trying to add one further layer, if I remove another layer  to gain some mamory to add the new one (same size of the removed one), I still get the "parameter is not valid" message.

This seems to me that the memory is not disposed after removing a layer from the map legend.

I found this old post of Shade1974  which I thought could solve my problem,

but I cannot find the mentioned property "PreventDisposeDataSet" anywhere. 

Is there anyone that can give me an explanation on how to face this problem?

Thank you