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
All Implemented Interfaces:
Resource, Coverage

public class MultiRangedRaster
extends AbstractRaster

This class represents an AbstractRaster with multiple ranges.

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
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.
 MultiRangedRaster getSubRaster(Envelope env, BandType[] bands, RasterGeoReference.OriginLocation targetLocation)
          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, getAsRaster, getColumns, getRasterReference, getResolutionInfo, getRows, isSimpleRaster, toString
 
Methods inherited from class org.deegree.coverage.AbstractCoverage
destroy, extendEnvelope, getCoordinateSystem, getEnvelope, getGeometryFactory, getLabel, getName, getSupplementProperties, init, 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 sub raster, may not be null
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 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 MultiRangedRaster getSubRaster(Envelope env,
                                      BandType[] bands,
                                      RasterGeoReference.OriginLocation targetLocation)
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
bands - to use for the given sub raster, if null the bands of the instance shall be used.
targetLocation - the origin location of the target sub raster, if null the origin location of the instance shall be used.
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.


Copyright © 2011. All Rights Reserved.