Class RasterHelper


public class RasterHelper extends VectorHelper

Helper class to create SWE structures used for various kinds of raster datasets, including various images and coverage types

Since:
May 2020
  • Field Details

    • DEF_IMAGE

      public static final String DEF_IMAGE
    • DEF_RASTER_WIDTH

      public static final String DEF_RASTER_WIDTH
    • DEF_RASTER_HEIGHT

      public static final String DEF_RASTER_HEIGHT
    • DEF_RASTER_DEPTH

      public static final String DEF_RASTER_DEPTH
    • DEF_RED_CHANNEL

      public static final String DEF_RED_CHANNEL
    • DEF_GREEN_CHANNEL

      public static final String DEF_GREEN_CHANNEL
    • DEF_BLUE_CHANNEL

      public static final String DEF_BLUE_CHANNEL
    • DEF_GRAY_CHANNEL

      public static final String DEF_GRAY_CHANNEL
    • DEF_GRID_CRS_1D

      public static final String DEF_GRID_CRS_1D
      See Also:
    • DEF_GRID_CRS_2D

      public static final String DEF_GRID_CRS_2D
      See Also:
    • DEF_GRID_CRS_3D

      public static final String DEF_GRID_CRS_3D
      See Also:
  • Constructor Details

    • RasterHelper

      public RasterHelper()
  • Method Details

    • newRasterImage

      public DataArray newRasterImage(Count width, Count height, ScalarComponent... channels)
      Creates a 2D-array representing a raster image
      Parameters:
      width - Image width component
      height - Image height component
      channels - List of image channels
      Returns:
      the new DataArray component object
    • newRasterImage

      public DataArray newRasterImage(int width, int height, ScalarComponent... channels)
      Creates a fixed size 2D-array representing a raster image
      Parameters:
      width - Image width
      height - Image height
      channels - List of image channels
      Returns:
      the new DataArray component object
    • newGrayscaleImage

      public DataArray newGrayscaleImage(Count width, Count height, DataType dataType)
      Creates a 2D-array representing a generic grayscale image.
      Parameters:
      width - Width component (fixed or variable size, see DataArray.setElementCount(Count))
      height - Height component (fixed or variable size, see DataArray.setElementCount(Count))
      dataType - Data type used for image samples
      Returns:
      the new DataArray component object
    • newGrayscaleImage

      public DataArray newGrayscaleImage(int width, int height, DataType dataType)
      Creates a fixed size 2D-array representing a generic grayscale image
      Parameters:
      width - Image width in pixels
      height - Image height in pixels
      dataType - Data type of each image sample
      Returns:
      the new DataArray component object
    • newRgbImage

      public DataArray newRgbImage(Count width, Count height, DataType dataType)
      Creates a 2D-array representing a generic RGB image.
      Parameters:
      width - Width component (fixed or variable size, see DataArray.setElementCount(Count))
      height - Height component (fixed or variable size, see DataArray.setElementCount(Count))
      dataType - Data type of each image sample (3 samples per pixel)
      Returns:
      the new DataArray component object
    • newRgbImage

      public DataArray newRgbImage(int width, int height, DataType dataType)
      Creates a fixed size 2D-array representing a generic RGB image
      Overrides:
      newRgbImage in class SWEHelper
      Parameters:
      width - Image width in pixels
      height - Image height in pixels
      dataType - Data type of each image sample (3 samples per pixel)
      Returns:
      the new DataArray component object
    • createGridCoordinates2D

      public SWEBuilders.VectorBuilder createGridCoordinates2D()
      Creates a 2D vector with x,y pixel coordinates
      Returns:
      A builder to set other options and build the final vector