org.openjump.core.rasterimage.sextante.rasterWrappers
Class GridWrapperNotInterpolated

java.lang.Object
  extended by org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapper
      extended by org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapperNotInterpolated

public class GridWrapperNotInterpolated
extends GridWrapper

A grid wrapper that does not perform interpolation to calculate cell values. This should be used when the window extent 'fits' into the structure (coordinates and cellsize) of the grid, so it is faster than using a grid wrapper with interpolation Upon construction, cellsizes are not checked, so they are assumed to be equal. Use a QueryableGridWindow to safely create a GridWrapper better than instantiating this class directly.

Author:
Victor Olaya

Field Summary
 
Fields inherited from class org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapper
INTERPOLATION_BicubicSpline, INTERPOLATION_Bilinear, INTERPOLATION_BSpline, INTERPOLATION_InverseDistance, INTERPOLATION_NearestNeighbour, m_iOffsetX, m_iOffsetY, m_Layer, m_WindowExtent
 
Constructor Summary
GridWrapperNotInterpolated(ISextanteRasterLayer layer, GridExtent windowExtent)
           
 
Method Summary
protected  void calculateOffsets()
           
 byte getCellValueAsByte(int x, int y)
           
 byte getCellValueAsByte(int x, int y, int band)
           
 double getCellValueAsDouble(int x, int y)
           
 double getCellValueAsDouble(int x, int y, int band)
           
 float getCellValueAsFloat(int x, int y)
           
 float getCellValueAsFloat(int x, int y, int band)
           
 int getCellValueAsInt(int x, int y)
           
 int getCellValueAsInt(int x, int y, int band)
           
 short getCellValueAsShort(int x, int y)
           
 short getCellValueAsShort(int x, int y, int band)
           
 
Methods inherited from class org.openjump.core.rasterimage.sextante.rasterWrappers.GridWrapper
getCellSize, getCellValueInLayerCoords, getGridExtent, getNoDataValue, getNX, getNY, getValueAt, isInLayer, isNoDataValue, setInterpolationMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridWrapperNotInterpolated

public GridWrapperNotInterpolated(ISextanteRasterLayer layer,
                                  GridExtent windowExtent)
Method Detail

calculateOffsets

protected void calculateOffsets()

getCellValueAsByte

public byte getCellValueAsByte(int x,
                               int y)
Specified by:
getCellValueAsByte in class GridWrapper

getCellValueAsByte

public byte getCellValueAsByte(int x,
                               int y,
                               int band)
Specified by:
getCellValueAsByte in class GridWrapper

getCellValueAsShort

public short getCellValueAsShort(int x,
                                 int y)
Specified by:
getCellValueAsShort in class GridWrapper

getCellValueAsShort

public short getCellValueAsShort(int x,
                                 int y,
                                 int band)
Specified by:
getCellValueAsShort in class GridWrapper

getCellValueAsInt

public int getCellValueAsInt(int x,
                             int y)
Specified by:
getCellValueAsInt in class GridWrapper

getCellValueAsInt

public int getCellValueAsInt(int x,
                             int y,
                             int band)
Specified by:
getCellValueAsInt in class GridWrapper

getCellValueAsFloat

public float getCellValueAsFloat(int x,
                                 int y)
Specified by:
getCellValueAsFloat in class GridWrapper

getCellValueAsFloat

public float getCellValueAsFloat(int x,
                                 int y,
                                 int band)
Specified by:
getCellValueAsFloat in class GridWrapper

getCellValueAsDouble

public double getCellValueAsDouble(int x,
                                   int y)
Specified by:
getCellValueAsDouble in class GridWrapper

getCellValueAsDouble

public double getCellValueAsDouble(int x,
                                   int y,
                                   int band)
Specified by:
getCellValueAsDouble in class GridWrapper