[gdal-dev] Re: Effeciency of "ReadRaster" in different storage format of mulit-band image

2012-05-17 Thread hitweiran
My question is when the format of data is BIL or BIP, the efficiency of Band.ReadRaster is quite low. How should I optimize code? I converted one mulit-band image into all the three formats and found that BSQ can read image in the most efficient, the other two is inefficient. So I don't know how c

[gdal-dev] Effeciency of "ReadRaster" in different storage format of mulit-band image

2012-05-17 Thread hitweiran
Hello, everyone. There are two methods to extract data from a mulit-band remote sensing image in GDAL. 1. Dataset.ReadRatser, that can read all data in mulit-band image. 2. Band.ReadRaster, that can read only one band of mulit-band image. Actually, there are three formats used to storage mulit-band

[gdal-dev] Re: The problem when using ReadRaster(C#) method

2011-08-31 Thread hitweiran
Tams: I extract the first band of that multiband image and save it as another img file, then the read to that single band is successful ! So maybe the mistake is due to the code get first band? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/The-problem-when-using-

[gdal-dev] Re: The problem when using ReadRaster(C#) method

2011-08-31 Thread hitweiran
I am sure the original data is available, because I see the imges in ENVI and have loaded it to MATLAB, so how can I inspect the values by gdallocationinfo??Thanks ! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/The-problem-when-using-ReadRaster-C-method-tp6745826p674665

[gdal-dev] Re: The problem when using ReadRaster(C#) method

2011-08-31 Thread hitweiran
Thank for both of you, I will try according to your suggestion. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/The-problem-when-using-ReadRaster-C-method-tp6745826p6746581.html Sent from the GDAL - Dev mailing list archive at Nabble.com. _

[gdal-dev] The problem when using ReadRaster(C#) method

2011-08-31 Thread hitweiran
I want to read a multiband image(in format of .img) by using method ReadRaster, however, I encount some problems. I just can't understand why the data loaded to memory is wrong? the code is like this OSGeo.GDAL.Dataset dataSet = OSGeo.GDAL.Gdal.Open(@"G:\building.img",OSGeo.GDAL.Access.GA_ReadOnly