CPLErr GDALRasterBand::RasterIO ( GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, void * pData, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nPixelSpace, int nLineSpace ) Read/write a region of image data for this band.
GDALDataset类中的RasterIO函数能够对图像任意指定区域.任意波段的数据按指定数据类型.指定排列方式读入内存和写入文件中,因此可以实现对大影像的分块读.写运算操作.针对特大的影像图像,有时为了减少内存消耗,对图像进行分块读取很有必要.在以下的测试代码中,给出了3种方式,每种方式的最终结果都是完全相同的,从内存占用情况来看:第一种大于第二种,第二种大于第三种.第三种消耗内存最小. 测试代码如下: int test_gdal_GDALDataset() { const char* im
gdal2tiles.py是GDAL库中用于生成TMS瓦片的python代码,支持谷歌墨卡托EPSG:3857与经纬度EPSG:4326两种瓦片,输出png格式图像. gdal2tiles.py More info at: http://wiki.osgeo.org/wiki/Tile_Map_Service_Specificationhttp://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendationhttp://msdn.microsoft.