Interface Resampling.Raster

All Known Implementing Classes:
BaseElevationModel
Enclosing interface:
Resampling

public static interface Resampling.Raster
A raster is a rectangular grid which provides sample values at a given raster position x,y.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the raster's height.
    boolean
    getSamples(int[] x, int[] y, double[][] samples)
    Gets the sample value at the given raster position or Float.NaN.
    int
    Gets the raster's width.
  • Method Details

    • getWidth

      int getWidth()
      Gets the raster's width.
      Returns:
      the raster's width
    • getHeight

      int getHeight()
      Gets the raster's height.
      Returns:
      the raster's height
    • getSamples

      boolean getSamples(int[] x, int[] y, double[][] samples) throws Exception
      Gets the sample value at the given raster position or Float.NaN.
      Parameters:
      x - the pixel's X-coordinate
      y - the pixel's Y-coordinate the sample value or Double.NaN if data is missing at the given raster position
      Returns:
      false if one value is Double#NaN
      Throws:
      Exception - if a non-runtime error occurs, e.g I/O error