org.deegree.coverage
Class ResolutionInfo

java.lang.Object
  extended by org.deegree.coverage.ResolutionInfo
All Implemented Interfaces:
Serializable

public class ResolutionInfo
extends Object
implements Serializable

Information about the (native) resolutions of a coverage.

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $
See Also:
Serialized Form

Nested Class Summary
static class ResolutionInfo.RoundingMode
          Different modes to retrieve the next / previous native resolution.
 
Constructor Summary
ResolutionInfo()
          A resolution info for continuous coverages.
ResolutionInfo(List<SampleResolution> resolutions)
          The info holds only one native resolution (typically a multi resolution raster).
ResolutionInfo(SampleResolution resolution)
          The info holds only one native resolution (typically from a single/tiled raster).
 
Method Summary
 SampleResolution getBestFit(SampleResolution targetResolution, ResolutionInfo.RoundingMode mode)
          Returns the best fitting (in terms of the given rounding mode) native resolution.
 List<SampleResolution> getNativeResolutions()
          Returns the native resolutions of the coverage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResolutionInfo

public ResolutionInfo()
A resolution info for continuous coverages.


ResolutionInfo

public ResolutionInfo(SampleResolution resolution)
The info holds only one native resolution (typically from a single/tiled raster).

Parameters:
resolution - the native resolution of the coverage.

ResolutionInfo

public ResolutionInfo(List<SampleResolution> resolutions)
The info holds only one native resolution (typically a multi resolution raster).

Parameters:
resolutions - the native resolutions of the coverage.
Method Detail

getNativeResolutions

public List<SampleResolution> getNativeResolutions()
Returns the native resolutions of the coverage. A 'continuous' coverage has no sample resolutions, it therefore will return the empty list.

Returns:
the native resolutions of the given coverage or the empty list if the coverage has no 'native' resolution (for example a continuous function). Never returns null

getBestFit

public SampleResolution getBestFit(SampleResolution targetResolution,
                                   ResolutionInfo.RoundingMode mode)
Returns the best fitting (in terms of the given rounding mode) native resolution. If the given coverage does not have a native resolution the given resolution will be returned.

Parameters:
targetResolution - the required resolution.
mode - the mode of the to be used for finding the best fit.
Returns:
the SampleResolution best fitting the given target resolution and mode, if no 'native' resolution is available, the given targetResolution will be returned, never null.


Copyright © 2011. All Rights Reserved.