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

org.deegree.coverage.raster
Class MultiResolutionRaster

java.lang.Object
  extended by org.deegree.coverage.AbstractCoverage
      extended by org.deegree.coverage.raster.MultiResolutionRaster

public class MultiResolutionRaster
extends AbstractCoverage

This class represents a collection of AbstractRaster instances that describe the same spatial region, but with different resolutions.

Version:
$Revision: 21386 $, $Date: 2009-12-10 16:42:57 +0100 (Do, 10 Dez 2009) $
Author:
Oliver Tonnhofer, last edited by: $Author: rbezema $

Constructor Summary
MultiResolutionRaster()
           
 
Method Summary
 void addRaster(AbstractRaster raster)
          Adds a raster to the MultiResolution Pyramid
 Envelope getEnvelope()
           
 AbstractRaster getRaster(double res)
          Returns the best-fitting raster for a given resolution.
 List<Double> getResolutions()
          Returns a list with the highest resolution of every level.
 AbstractRaster getSubset(Envelope envelope, double resolution)
          Returns a subset of the raster for a given resolution.
 
Methods inherited from class org.deegree.coverage.AbstractCoverage
extendEnvelope, getCoordinateSystem, getGeometryFactory, getLabel, getName, getSupplementProperties, setCoordinateSystem, setEnvelope, setLabel, setName, setSupplementProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiResolutionRaster

public MultiResolutionRaster()
Method Detail

addRaster

public void addRaster(AbstractRaster raster)
Adds a raster to the MultiResolution Pyramid

Parameters:
raster - raster to be added to the MultiResolutionRaster

getRaster

public AbstractRaster getRaster(double res)
Returns the best-fitting raster for a given resolution. This method tries to return the optimal raster for the requested resolution. It returns the next best resolution (lower resolution value) if available, otherwise it returns the next raster with a higher resolution value.

Parameters:
res - resolution in world units per pixel
Returns:
raster for resolution or null if no rasters were defined

getEnvelope

public Envelope getEnvelope()
Overrides:
getEnvelope in class AbstractCoverage
Returns:
The envelope of the coverage.

getSubset

public AbstractRaster getSubset(Envelope envelope,
                                double resolution)
Returns a subset of the raster for a given resolution. The matching raster is selected using getRaster(double).

Parameters:
envelope - envelope of the subset
resolution - resolution in world units per pixel
Returns:
subset of the best-fitting raster
See Also:
getRaster(double)

getResolutions

public List<Double> getResolutions()
Returns a list with the highest resolution of every level. The list is sorted ascending (from highest to lowest resolution).

Returns:
a list of all resolutions

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

]]>