[Gdal-dev] some problems in rasterio
Fu Chen
fchen at ne.rsgs.ac.cn
Sat Nov 22 08:07:05 EST 2003
I am reading the code of rasterio.cpp. In the code of IRasterIO,
for( iBufYOff = 0; iBufYOff < nBufYSize; iBufYOff++ )
{
int iBufOffset, iSrcOffset;
dfSrcY = (iBufYOff+0.5) * dfSrcYInc + nYOff;
iSrcY = (int) dfSrcY;
iBufOffset = iBufYOff * nLineSpace;
The problem is why there is a 0.5 here. Isn't iBufYOff=0 --> nYOff?
Sometimes i think the IRasterIO should turn its XOff YOff XSize YSize into double, which will make it more accurate when you are doing supersample and extract data by tiles.
Best regards
Fu CHEN
More information about the Gdal-dev
mailing list