deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.coverage.raster
Class MultiRangedRaster

java.lang.Object
  extended by org.deegree.coverage.AbstractCoverage
      extended by org.deegree.coverage.raster.AbstractRaster
          extended by org.deegree.coverage.raster.MultiRangedRaster

public class MultiRangedRaster
extends AbstractRaster

This class represents an AbstractRaster with multiple ranges.

Version:
$Revision: 20445 $, $Date: 2009-10-29 11:39:06 +0100 (Do, 29 Okt 2009) $
Author:
Oliver Tonnhofer, last edited by: $Author: rbezema $

Constructor Summary
MultiRangedRaster()
          Create an empty MultiRangedRaster.
 
Method Summary
 void addRaster(AbstractRaster raster)
          Adds an AbstractRaster to the MultiRangedRaster
 MultiRangedRaster copy()
          Creates a copy of the raster with all the data.
 SimpleRaster getAsSimpleRaster()
          Returns the AbstractRaster as a SimpleRaster.
 int getNumberOfRanges()
          Returns the number of ranges
 AbstractRaster getRange(int index)
          Returns a single range with given index
 MultiRangedRaster getRanges(int... indices)
          Returns a new MultiRangedRaster with selected indices.
 RasterDataInfo getRasterDataInfo()
          Returns available information on the raster data.
 MultiRangedRaster getSubRaster(double x, double y, double x2, double y2)
          Returns a subset of the raster.
 MultiRangedRaster getSubRaster(Envelope env)
          Returns a subset of the raster, note this is a view on the given raster.
 MultiRangedRaster getSubRaster(Envelope env, BandType[] bands)
          Returns a subset of the raster, note this is a view on the given raster.
 void setSubRaster(double x, double y, AbstractRaster source)
          Sets the MultiRangedRaster with data from source.
 void setSubRaster(double x, double y, int index, AbstractRaster source)
          Sets a range with data from source.
 void setSubRaster(Envelope env, 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.
 void setSubset(double x, double y, MultiRangedRaster source)
          Sets the MultiRangedRaster with data from source.
 
Methods inherited from class org.deegree.coverage.raster.AbstractRaster
checkBounds, envelopeString, extendRasterReference, getColumns, getRasterReference, getRows, isSimpleRaster, toString
 
Methods inherited from class org.deegree.coverage.AbstractCoverage
extendEnvelope, getCoordinateSystem, getEnvelope, getGeometryFactory, getLabel, getName, getSupplementProperties, setCoordinateSystem, setEnvelope, setLabel, setName, setSupplementProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiRangedRaster

public MultiRangedRaster()
Create an empty MultiRangedRaster.

Method Detail

copy

public MultiRangedRaster 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.

addRaster

public void addRaster(AbstractRaster raster)
Adds an AbstractRaster to the MultiRangedRaster

Parameters:
raster -

getRange

public AbstractRaster getRange(int index)
Returns a single range with given index

Parameters:
index - index of range
Returns:
selected range as AbstractRaster

getRanges

public MultiRangedRaster getRanges(int... indices)
Returns a new MultiRangedRaster with selected indices.

Parameters:
indices - selected ranges
Returns:
new MultiRangeRaster

getSubRaster

public MultiRangedRaster 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 subset
Returns:
subset of the raster

getSubRaster

public MultiRangedRaster 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 subset
bands - to use for the given subset.
Returns:
subset of the raster

getSubRaster

public MultiRangedRaster getSubRaster(double x,
                                      double y,
                                      double x2,
                                      double y2)
Description copied from class: AbstractRaster
Returns a subset of the raster.

Overrides:
getSubRaster in class AbstractRaster
Parameters:
x - left boundary
y - upper boundary
x2 - right boundary
y2 - lower boundary
Returns:
subset of the raster

setSubRaster

public void setSubRaster(double x,
                         double y,
                         AbstractRaster source)
Sets the MultiRangedRaster with data from source. The number of ranges and the number of bands in source must be equal.

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 index,
                         AbstractRaster source)
Sets a range with data from source.

Specified by:
setSubRaster in class AbstractRaster
Parameters:
x - left boundary
y - upper boundary
index - index of the destination range
source - data to copy (first band will be used)

setSubset

public void setSubset(double x,
                      double y,
                      MultiRangedRaster source)
Sets the MultiRangedRaster with data from source. The number of ranges must be equal.

Parameters:
x - left boundary
y - upper boundary
source - data to copy

setSubRaster

public void setSubRaster(Envelope env,
                         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:
env - Envelope with the destination area
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

getNumberOfRanges

public int getNumberOfRanges()
Returns the number of ranges

Returns:
number of ranges

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.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>