Class PixelFunctionEditors

java.lang.Object
org.apache.sedona.common.raster.PixelFunctionEditors

public class PixelFunctionEditors extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.geotools.coverage.grid.GridCoverage2D
    setValue(org.geotools.coverage.grid.GridCoverage2D raster, int colX, int rowY, double newValue)
    Return a raster by updated the pixel specified by pixel location.
    static org.geotools.coverage.grid.GridCoverage2D
    setValue(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, double newValue)
    Return a raster by updated the pixel specified by pixel location.
    static org.geotools.coverage.grid.GridCoverage2D
    setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, int width, int height, double[] values)
    Returns a raster by replacing the values of pixels in a specified rectangular region.
    static org.geotools.coverage.grid.GridCoverage2D
    setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, int width, int height, double[] values, boolean keepNoData)
    Returns a raster by replacing the values of pixels in a specified rectangular region.
    static org.geotools.coverage.grid.GridCoverage2D
    setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value)
    Returns a raster by replacing the values of pixels in a specified geometry region.
    static org.geotools.coverage.grid.GridCoverage2D
    setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value, boolean allTouched)
    Returns a raster by replacing the values of pixels in a specified geometry region.
    static org.geotools.coverage.grid.GridCoverage2D
    setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value, boolean allTouched, boolean keepNoData)
    Returns a raster by replacing the values of pixels in a specified geometry region.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PixelFunctionEditors

      public PixelFunctionEditors()
  • Method Details

    • setValues

      public static org.geotools.coverage.grid.GridCoverage2D setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, int width, int height, double[] values, boolean keepNoData)
      Returns a raster by replacing the values of pixels in a specified rectangular region.
      Parameters:
      raster - Raster to be edited
      band - Band of the raster to be edited
      colX - UpperLeftX of the region
      rowY - UpperLeftY of the region
      width - Width of the said region
      height - Height of the said region
      values - Array of values to be inserted into the said region
      keepNoData - To keep No Data value or add the given value to the raster
      Returns:
      An updated Raster
    • setValues

      public static org.geotools.coverage.grid.GridCoverage2D setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, int width, int height, double[] values)
      Returns a raster by replacing the values of pixels in a specified rectangular region. Convenience function without keepNoData parameter.
      Parameters:
      raster - Raster to be edited
      band - Band of the raster to be edited
      colX - UpperLeftX of the region
      rowY - UpperLeftY of the region
      width - Width of the said region
      height - Height of the said region
      values - Array of values to be inserted into the said region
      Returns:
      An updated Raster
    • setValues

      public static org.geotools.coverage.grid.GridCoverage2D setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value, boolean allTouched, boolean keepNoData) throws org.geotools.api.referencing.FactoryException, org.geotools.api.referencing.operation.TransformException
      Returns a raster by replacing the values of pixels in a specified geometry region. It converts the Geometry to a raster using RS_AsRaster.
      Parameters:
      raster - Raster to be edited
      band - Band of the raster to be edited
      geom - Geometry region to update
      value - Value to updated in the said region
      allTouched - When set to true, sets value for all pixels touched by geom
      keepNoData - To keep no data value or not
      Returns:
      An updated raster
      Throws:
      org.geotools.api.referencing.FactoryException
      org.geotools.api.referencing.operation.TransformException
    • setValues

      public static org.geotools.coverage.grid.GridCoverage2D setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value, boolean allTouched) throws org.geotools.api.referencing.FactoryException, org.geotools.api.referencing.operation.TransformException
      Returns a raster by replacing the values of pixels in a specified geometry region. It converts the Geometry to a raster using RS_AsRaster. A convenience function with keepNoData as false.
      Parameters:
      raster - Input raster to be updated
      band - Band of the raster to be edited
      geom - Geometry region to update
      value - Value to updated in the said region
      allTouched - When set to true, sets value for all pixels touched by geom
      Returns:
      An updated raster
      Throws:
      org.geotools.api.referencing.FactoryException
      org.geotools.api.referencing.operation.TransformException
    • setValues

      public static org.geotools.coverage.grid.GridCoverage2D setValues(org.geotools.coverage.grid.GridCoverage2D raster, int band, org.locationtech.jts.geom.Geometry geom, double value) throws org.geotools.api.referencing.FactoryException, org.geotools.api.referencing.operation.TransformException
      Returns a raster by replacing the values of pixels in a specified geometry region. It converts the Geometry to a raster using RS_AsRaster. A convenience function with keepNoData as false.
      Parameters:
      raster - Input raster to be updated
      band - Band of the raster to be edited
      geom - Geometry region to update
      value - Value to updated in the said region
      Returns:
      An updated raster
      Throws:
      org.geotools.api.referencing.FactoryException
      org.geotools.api.referencing.operation.TransformException
    • setValue

      public static org.geotools.coverage.grid.GridCoverage2D setValue(org.geotools.coverage.grid.GridCoverage2D raster, int band, int colX, int rowY, double newValue)
      Return a raster by updated the pixel specified by pixel location.
      Parameters:
      raster - Input raster to be edited
      band - Band of the raster to be updated
      colX - Column of the pixel
      rowY - Row of the pixel
      newValue - New value to be updated
      Returns:
      An updated raster
    • setValue

      public static org.geotools.coverage.grid.GridCoverage2D setValue(org.geotools.coverage.grid.GridCoverage2D raster, int colX, int rowY, double newValue)
      Return a raster by updated the pixel specified by pixel location.
      Parameters:
      raster - Input raster to be edited
      colX - Column of the pixel
      rowY - Row of the pixel
      newValue - New value to be updated
      Returns:
      An updated raster