org.deegree.coverage.raster.data
Class DataView

java.lang.Object
  extended by org.deegree.coverage.raster.geom.RasterRect
      extended by org.deegree.coverage.raster.data.DataView

public class DataView
extends RasterRect

The DataView class defines a view on Rasterdata.

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

Field Summary
 RasterDataInfo dataInfo
          the view info on the raster data
 
Fields inherited from class org.deegree.coverage.raster.geom.RasterRect
height, width, x, y
 
Constructor Summary
DataView(int xOffset, int yOffset, int width, int height, RasterDataInfo viewOnData)
          Constructor if the info on the view on the data equals the original raster data info.
DataView(int xOffset, int yOffset, int width, int height, RasterDataInfo viewOnData, RasterDataInfo originalInfo)
           
DataView(RasterRect rasterRect, RasterDataInfo viewOnData)
          Constructor if the info on the view on the data equals the original raster data info.
DataView(RasterRect rasterRect, RasterDataInfo viewOnData, RasterDataInfo originalInfo)
           
 
Method Summary
 boolean equals(Object other)
           
 int getBandOffset(int requestedBand)
          Returns the band number of the original data for a requested band in this view on the data.
 int hashCode()
          Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast.
 
Methods inherited from class org.deegree.coverage.raster.geom.RasterRect
intersection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dataInfo

public final RasterDataInfo dataInfo
the view info on the raster data

Constructor Detail

DataView

public DataView(int xOffset,
                int yOffset,
                int width,
                int height,
                RasterDataInfo viewOnData)
Constructor if the info on the view on the data equals the original raster data info.

Parameters:
xOffset - offset in the original raster data x-axis
yOffset - offset in the original raster data y-axis
width - the width of the new view on the original data
height - the height of the view on the original data
viewOnData - information on the view of this data.

DataView

public DataView(RasterRect rasterRect,
                RasterDataInfo viewOnData)
Constructor if the info on the view on the data equals the original raster data info.

Parameters:
rasterRect - to get the views parameters from.
viewOnData - information on the view of this data.

DataView

public DataView(RasterRect rasterRect,
                RasterDataInfo viewOnData,
                RasterDataInfo originalInfo)
Parameters:
rasterRect - to get the views parameters from.
viewOnData - information on the view of this data.
originalInfo - used to calculate the band offsets for this view.

DataView

public DataView(int xOffset,
                int yOffset,
                int width,
                int height,
                RasterDataInfo viewOnData,
                RasterDataInfo originalInfo)
Parameters:
xOffset - offset in the original raster data x-axis
yOffset - offset in the original raster data y-axis
width - the width of the new view on the original data
height - the height of the view on the original data
viewOnData - information on the view of this data.
originalInfo - used to calculate the band offsets for this view.
Method Detail

getBandOffset

public int getBandOffset(int requestedBand)
Returns the band number of the original data for a requested band in this view on the data.

Parameters:
requestedBand - of the view
Returns:
the band number in the original data.

equals

public boolean equals(Object other)
Overrides:
equals in class RasterRect

hashCode

public int hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. It is created from field f as follows:

Combining the hash code(s) computed above: result = 37 * result + code;

Overrides:
hashCode in class RasterRect
Returns:
(int) ( result >>> 32 ) ^ (int) result;
See Also:
Object.hashCode()


Copyright © 2011. All Rights Reserved.