bool GDALWMSRasterBand::IsBlockInCache(int x, int y) { bool ret = false; GDALRasterBlock *b = TryGetLockedBlockRef(x, y); if (b != NULL) { ret = true; b->DropLock(); } return ret; }
/*********************************************************************** * \brief Returns true if the (only) block is stored in the cache **********************************************************************/ GBool PostGISRasterTileRasterBand::IsCached() { GDALRasterBlock * poBlock = TryGetLockedBlockRef(0, 0); if (poBlock != NULL) { poBlock->DropLock(); return true; } return false; }
int RawRasterBand::IsLineLoaded( int nLineOff, int nLines ) { int iLine; for ( iLine = nLineOff; iLine < nLineOff + nLines; iLine++ ) { GDALRasterBlock *poBlock = TryGetLockedBlockRef( 0, iLine ); if( poBlock != NULL ) { poBlock->DropLock(); return TRUE; } } return FALSE; }
int RawRasterBand::IsSignificantNumberOfLinesLoaded( int nLineOff, int nLines ) { int iLine; int nCountLoaded = 0; for ( iLine = nLineOff; iLine < nLineOff + nLines; iLine++ ) { GDALRasterBlock *poBlock = TryGetLockedBlockRef( 0, iLine ); if( poBlock != NULL ) { poBlock->DropLock(); nCountLoaded ++; if( nCountLoaded > nLines / 20 ) { return TRUE; } } } return FALSE; }