Class GridData

java.lang.Object
hec.heclib.grid.GridData
All Implemented Interfaces:
Serializable

public class GridData extends Object implements Serializable
See Also:
  • Constructor Details

    • GridData

      public GridData(GridData gridData)
      Copy Constructor. Makes a copy of given GridData object.
      Parameters:
      gridData -
    • GridData

      public GridData()
    • GridData

      public GridData(float[] array, GridInfo gridInfo)
  • Method Details

    • getData

      public float[] getData()
    • getGridInfo

      public GridInfo getGridInfo()
    • initGridData

      public int initGridData(float[] array, GridInfo gridInfo)
    • show

      public void show(double ge)
    • show

      public void show(double ge, PrintStream out)
    • getValueAt

      public double getValueAt(int x, int y)
      return the value at the position x,y
    • setValueAt

      public int setValueAt(int x, int y, float value)
      Sets the value at position x,y
      Parameters:
      x -
      y -
      value -
      Returns:
      0 if there is no error, otherwise -1
    • setValueAt

      public int setValueAt(int x, int y, double value)
      Sets the value at position x,y
      Parameters:
      x -
      y -
      value -
      Returns:
      0 if there is no error, otherwise -1
    • updateStatistics

      public int updateStatistics()
    • roundValues

      public int roundValues(int precision)
      public int roundValues(int precision) Rounds off values in the data array to the decimal precision given. This reduces the number of unique values in the array, resulting in more effective data compression when we use the ZLIB deflate method.
      Parameters:
      precision - Number of decimal places of precision: 0 rounds to whole numbers 1 to tenths, etc.
      Returns:
      Status: 0 indicates success
    • getNumberMissing

      public int getNumberMissing()
      Returns:
    • setData

      public void setData(float[] data)
    • initGridInfo

      public void initGridInfo(GridInfo gridInfo)