/** * Get intersection of the requested rectangle with the rectangle of the grid file. * * @param original * @return the intersection with the grids raster rectangle and the given. */ protected RasterRect snapToGrid( RasterRect original ) { return RasterRect.intersection( rasterRect, original ); }
/** * @param floatBuffer * @param noData * @param bufferDomain * @param view */ public RawDataBufferFloat( ByteBuffer floatBuffer, float noData, RasterRect bufferDomain, DataView view ) { super( DataBuffer.TYPE_FLOAT, floatBuffer.capacity() / SIZE ); this.floatBuffer = floatBuffer; this.noData = Float.floatToIntBits( noData ); this.maxViewData = RasterRect.intersection( bufferDomain, view ); toNullPoint = ( ( bufferDomain.width * maxViewData.y ) + maxViewData.x ); lineStride = bufferDomain.width; }
ByteBuffer destBuffer, int sampleSize ) throws IOException { RasterRect inter = RasterRect.intersection( srcRect, destRect ); if ( inter != null ) {
this.maxDataHeight = maxDataHeight; RasterRect origData = new RasterRect( 0, 0, maxDataWidth, maxDataHeight ); maxViewData = RasterRect.intersection( origData, view ); if ( maxViewData == null ) { maxViewData = new RasterRect( 0, 0, 0, 0 );
infoFile.getTileRasterHeight() * tileRow, infoFile.getTileRasterWidth(), infoFile.getTileRasterHeight() ); RasterRect inter = RasterRect.intersection( tileRect, fRect ); if ( inter != null ) {
/** * Returns the min column, row and max column row of the given rect. The rectangle will be cut off to fit the data. * If the rect does not intersect the data, <code>null</code> will be returned. * * @param rect * @return {min column, min row, max column, max row} or <code>null</code> if the given rect does not intersect the * data. */ private final int[] getIntersectingTiles( RasterRect rect ) { RasterRect fRect = RasterRect.intersection( sampleDomain, rect ); if ( fRect != null ) { final int minCol = getColNumber( fRect.x ); final int minRow = getRowNumber( fRect.y ); final int maxCol = getColNumber( fRect.x + fRect.width ); final int maxRow = getRowNumber( fRect.y + fRect.height ); if ( ( maxCol != -1 ) && ( maxRow != -1 ) && ( minCol != columns ) && ( minRow != rows ) ) { return new int[] { minCol, minRow, maxCol, maxRow }; } } return null; }
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {
tileRect.y = row * tileHeight; final RasterRect intersectionWithTile = RasterRect.intersection( tileRect, requestedRect ); if ( intersectionWithTile != null ) {