org.deegree.coverage.raster.io.grid
Class SplittedBlobReader
java.lang.Object
org.deegree.coverage.raster.io.grid.GridReader
org.deegree.coverage.raster.io.grid.GridFileReader
org.deegree.coverage.raster.io.grid.SplittedBlobReader
- All Implemented Interfaces:
- RasterReader
public class SplittedBlobReader
- extends GridFileReader
The SplittedBlobReader
is a rasterreader for a grid file which is spread over multiple blobs. The blobs
are organised as follows: Each blob will hold the so much rows until a given file size is reached, the next blob will
hold the next tile in the same row and will then add rows etc. In other words the grid looks like this:
rows: 5 cols: 5 filesize: 7*tilesize.
- file:blob_0.bin [(0,0)(0,1)(0,2)(0,3)(0,4)(1,0)(1,1)]
- file:blob_1.bin [(1,2)(1,3)(1,4),(2,0)(2,1)(2,2)(2,3)]
- ...
the last file might be partially empty. Each tile will be saved flat row first (rb, please check this):
pixel(0,0)(0,1)(0,2)(0,3)(0,4)(0,5)(0,6)(0,7)(1,0)(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)(1,7)
- Version:
- $Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
- Author:
- Rutger Bezema, last edited by: $Author: mschneider $
Methods inherited from class org.deegree.coverage.raster.io.grid.GridReader |
allocateTileBuffer, canReadTiles, getBytesPerTile, getEnvelope, getGeoReference, getHeight, getIntersectingTiles, getNumberOfTiles, getRasterDataInfo, getTile, getTileColumns, getTileData, getTileEnvelope, getTileId, getTileRasterHeight, getTileRasterWidth, getTileRows, getTilesPerBlob, getWidth, instantiate, load, setTilesPerBlob, shouldCreateCacheFile, snapToGrid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SplittedBlobReader
public SplittedBlobReader(File blobDir,
String blobFilename,
String blobFileext,
GridMetaInfoFile infoFile)
- Creates a blob reader for a grid file which is spread over multiple blobs.
- Parameters:
blobDir
- blobFilename
- blobFileext
- infoFile
-
read
protected void read(int columnId,
int rowId,
ByteBuffer buffer)
throws IOException
- Description copied from class:
GridReader
- Reads the data from the grid.
- Overrides:
read
in class GridFileReader
- Throws:
IOException
canLoad
public boolean canLoad(File filename)
- Description copied from interface:
RasterReader
- Check if the raster reader is able to read the given raster file.
- Specified by:
canLoad
in interface RasterReader
- Overrides:
canLoad
in class GridFileReader
- Returns:
- true if the class can read the raster
read
public BufferResult read(RasterRect rect,
ByteBuffer resultBuffer)
throws IOException
- Specified by:
read
in interface RasterReader
- Overrides:
read
in class GridFileReader
- Parameters:
rect
- to read.resultBuffer
- to store the result in
- Returns:
- the read buffer and its domain
- Throws:
IOException
Copyright © 2011. All Rights Reserved.