code: public double getValueAt( Coordinate coordinate ) {
          if (geodata == null) {
              throw new IllegalArgumentException("The data have first to be read!");
          }
          int[] coordinateToNearestRowCol = GrassLegacyUtilities.coordinateToNearestRowCol(inWindow, coordinate);
          if (coordinateToNearestRowCol != null) {
              int row = coordinateToNearestRowCol[0];
              int col = coordinateToNearestRowCol[1];
              if (row > 0 && row < geodata.length) {
                  if (col > 0 && col < geodata[0].length) {
                      return geodata[row][col];
                  }
              }
          }
          return HMConstants.doubleNovalue;
      }
docs: Get a single value in a position of the raster.
  
  @param coordinate the coordinate in which the value is read.
  @return the value read in the given coordinate.