org.deegree.coverage.raster
Class TiledRaster

java.lang.Object
  extended by org.deegree.coverage.AbstractCoverage
      extended by org.deegree.coverage.raster.AbstractRaster
          extended by org.deegree.coverage.raster.TiledRaster
All Implemented Interfaces:
Resource, Coverage

public class TiledRaster
extends AbstractRaster

This class represents a tiled AbstractRaster. A TiledRaster contains multiple non-overlapping (TODO verify this) AbstractRasters

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Oliver Tonnhofer, last edited by: $Author: mschneider $

Constructor Summary
TiledRaster(TileContainer tileContainer)
          Creates a new TiledRaster with tiles from the given TileContainer
 
Method Summary
 TiledRaster copy()
          Creates a copy of the raster with all the data.
 SimpleRaster getAsSimpleRaster()
          Returns the AbstractRaster as a SimpleRaster.
 ICRS getCoordinateSystem()
          Returns the native coordinate system this coverage is defined in.
 Envelope getEnvelope()
          Returns the (spatial) domain of this coverage.
 RasterDataInfo getRasterDataInfo()
          Returns available information on the raster data.
 RasterGeoReference getRasterReference()
           
 ResolutionInfo getResolutionInfo()
          Returns information about the possible sample resolutions of this coverage.
 TiledRaster getSubRaster(Envelope env)
          Returns a subset of the raster, note this is a view on the given raster.
 TiledRaster getSubRaster(Envelope env, BandType[] bands)
          Returns a subset of the raster, note this is a view on the given raster.
 TiledRaster getSubRaster(Envelope env, BandType[] bands, RasterGeoReference.OriginLocation targetLocation)
          Get a subraster which has it's origin location at the given location.
 TileContainer getTileContainer()
          Returns the wrapper for all tiles.
 void setCoordinateSystem(ICRS crs)
           
 void setSubRaster(double x, double y, AbstractRaster source)
          Sets the raster with data from source.
 void setSubRaster(double x, double y, int dstBand, AbstractRaster source)
          Sets a single band with data from source.
 void setSubRaster(Envelope envelope, AbstractRaster source)
          Sets the raster with data from source.
 void setSubRaster(Envelope env, int dstBand, AbstractRaster source)
          Sets a single band with data from source.
 String toString()
           
 
Methods inherited from class org.deegree.coverage.raster.AbstractRaster
checkBounds, envelopeString, extendRasterReference, getAsRaster, getColumns, getRows, getSubRaster, isSimpleRaster
 
Methods inherited from class org.deegree.coverage.AbstractCoverage
destroy, extendEnvelope, getGeometryFactory, getLabel, getName, getSupplementProperties, init, setEnvelope, setLabel, setName, setSupplementProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TiledRaster

public TiledRaster(TileContainer tileContainer)
Creates a new TiledRaster with tiles from the given TileContainer

Parameters:
tileContainer - wraps all tiles
Method Detail

getResolutionInfo

public ResolutionInfo getResolutionInfo()
Returns information about the possible sample resolutions of this coverage.

Specified by:
getResolutionInfo in interface Coverage
Overrides:
getResolutionInfo in class AbstractRaster
Returns:
information about the possible sample resolutions.

getTileContainer

public TileContainer getTileContainer()
Returns the wrapper for all tiles.

Returns:
The container for all tiles.

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Coverage
Returns the (spatial) domain of this coverage.

Specified by:
getEnvelope in interface Coverage
Overrides:
getEnvelope in class AbstractCoverage
Returns:
The envelope of the coverage.

getRasterReference

public RasterGeoReference getRasterReference()
Overrides:
getRasterReference in class AbstractRaster
Returns:
The raster reference of this raster.

setCoordinateSystem

public void setCoordinateSystem(ICRS crs)
Overrides:
setCoordinateSystem in class AbstractCoverage

getCoordinateSystem

public ICRS getCoordinateSystem()
Description copied from interface: Coverage
Returns the native coordinate system this coverage is defined in.

Specified by:
getCoordinateSystem in interface Coverage
Overrides:
getCoordinateSystem in class AbstractCoverage
Returns:
the coordinate system of the raster

copy

public TiledRaster copy()
Description copied from class: AbstractRaster
Creates a copy of the raster with all the data.

Specified by:
copy in class AbstractRaster
Returns:
A copy of the raster.

getSubRaster

public TiledRaster getSubRaster(Envelope env)
Description copied from class: AbstractRaster
Returns a subset of the raster, note this is a view on the given raster.

Specified by:
getSubRaster in class AbstractRaster
Parameters:
env - envelope of the sub raster, may not be null
Returns:
subset of the raster

getSubRaster

public TiledRaster getSubRaster(Envelope env,
                                BandType[] bands)
Description copied from class: AbstractRaster
Returns a subset of the raster, note this is a view on the given raster.

Specified by:
getSubRaster in class AbstractRaster
Parameters:
env - envelope of the sub raster, may not be null
bands - to use for the given sub raster, if null the bands of the instance shall be used.
Returns:
subset of the raster

getSubRaster

public TiledRaster getSubRaster(Envelope env,
                                BandType[] bands,
                                RasterGeoReference.OriginLocation targetLocation)
Get a subraster which has it's origin location at the given location.

Specified by:
getSubRaster in class AbstractRaster
Parameters:
env - of the subraster
bands - defining the bands of the sub raster
targetLocation - the new origin's location definition.
Returns:
a subraster of the size of the given envelope, having the given bands and the given target location.

setSubRaster

public void setSubRaster(Envelope envelope,
                         AbstractRaster source)
Description copied from class: AbstractRaster
Sets the raster with data from source. Source must overlap the raster (within the envelope).

Specified by:
setSubRaster in class AbstractRaster
Parameters:
envelope - Envelope with the destination area
source - data to copy

setSubRaster

public void setSubRaster(double x,
                         double y,
                         AbstractRaster source)
Description copied from class: AbstractRaster
Sets the raster with data from source.

Specified by:
setSubRaster in class AbstractRaster
Parameters:
x - left boundary
y - upper boundary
source - data to copy

setSubRaster

public void setSubRaster(double x,
                         double y,
                         int dstBand,
                         AbstractRaster source)
Description copied from class: AbstractRaster
Sets a single band with data from source. Copies the first band of source into dstBand.

Specified by:
setSubRaster in class AbstractRaster
Parameters:
x - left boundary
y - upper boundary
dstBand - selected destination band
source - data to copy

setSubRaster

public void setSubRaster(Envelope env,
                         int dstBand,
                         AbstractRaster source)
Description copied from class: AbstractRaster
Sets a single band with data from source.

Specified by:
setSubRaster in class AbstractRaster
Parameters:
env - destination area
dstBand - selected destination band
source - data to copy

getAsSimpleRaster

public SimpleRaster getAsSimpleRaster()
Description copied from class: AbstractRaster
Returns the AbstractRaster as a SimpleRaster. The data gets cropped (TiledRaster) or merged (MultiRange) if necessary.

Specified by:
getAsSimpleRaster in class AbstractRaster
Returns:
The raster data as SimpleRaster

toString

public String toString()
Overrides:
toString in class AbstractRaster

getRasterDataInfo

public RasterDataInfo getRasterDataInfo()
Description copied from class: AbstractRaster
Returns available information on the raster data. This method should be called with care, it may under circumstances, cause massive loading of raster data.

Specified by:
getRasterDataInfo in class AbstractRaster
Returns:
available information on the raster data.


Copyright © 2011. All Rights Reserved.