Class GenericRasterAlgorithm

java.lang.Object
org.openjump.core.rasterimage.algorithms.GenericRasterAlgorithm

public class GenericRasterAlgorithm extends Object
  • Field Details

  • Constructor Details

    • GenericRasterAlgorithm

      public GenericRasterAlgorithm()
  • Method Details

    • save_ChangeNoData

      public void save_ChangeNoData(File outputFile, RasterImageLayer rasterImageLayer, int band, double oldnodata, double newnodata) throws IOException
      Modify nodata tag a values to a defined input and save to tif file
      Parameters:
      outputFile - file to save. Eg "C:/folder/filename.tif" (always add extension)
      rasterImageLayer - input RasterImageLayer
      band - input band
      oldnodata - original nodata value
      newnodata - new nodata value
      Throws:
      IOException - if an IOException occurs during getRasterData or writeImage operations
    • save_ResetNoDataTag

      public void save_ResetNoDataTag(File outputFile, RasterImageLayer rasterImageLayer, int band, double nodata) throws IOException
      Parameters:
      outputFile - output file
      rasterImageLayer - raster image layer
      band - th eband to process
      nodata - nodata value
      Throws:
      IOException - if an IOException occurs
    • save_LimitValidData

      public void save_LimitValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata) throws IOException
      Throws:
      IOException
    • save_ExtractValidData

      public void save_ExtractValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata) throws IOException
      Extract a raster defining limits of output
      Parameters:
      outputFile - output file
      rasterImageLayer - raster image layer
      band - the band to process
      mindata - minimum data value to be extracted
      maxdata - maximum data value to be extracted
      Throws:
      IOException - if an IOException occurs
    • save_ChangeDecimalValues

      public void save_ChangeDecimalValues(File outputFile, RasterImageLayer rLayer, int band, int n) throws IOException
      Reset the values to a defined number of decimals
      Parameters:
      outputFile - output file
      rLayer - raster image layer
      band - the band to process
      n - Number of decimal to set the values
      Throws:
      IOException - if an IOException occurs
    • saved

      protected void saved(File file)
    • notsaved

      protected void notsaved()
    • save_CropToEnvelope

      public void save_CropToEnvelope(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Envelope envelope) throws IOException
      Crop a RasterImageLayer to a defined envelope and save to tif file
      Parameters:
      outputFile - file to save. Eg "C:/folder/filename.tif" (always add extension)
      rasterLayer - input RasterImageLayer
      envelope - input envelope to crop RasterImageLayer
      Throws:
      IOException - if an IOException occurs
    • save_CropToGeometry

      public void save_CropToGeometry(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Geometry geometry) throws IOException
      Throws:
      IOException
    • save_WarpToEnvelope

      public void save_WarpToEnvelope(File file, RasterImageLayer rLayer, org.locationtech.jts.geom.Envelope env) throws Exception
      Throws:
      Exception
    • load

      public void load(File inputFile, String category) throws Exception
      Load a file into the workbench
      Parameters:
      inputFile - eg. "new File(C:/folder/fileName.tif)"
      category - eg. "Working"
      Throws:
      Exception - if an IOException occurs in RasterImageIO.getImageDimensions or if a general Exception occurs in RasterImageIO.getGeoReferencing or in RasterImageIO.loadImage