Class RasterToVectorOp

java.lang.Object
org.esa.snap.core.gpf.Operator
org.esa.snap.core.gpf.common.rtv.RasterToVectorOp

@OperatorMetadata(alias="Raster-To-Vector", category="Raster", description="Converts a raster band to a vector", authors="SNAP Team", version="1.0", copyright="(c) 2024 by CS GROUP ROMANIA") public class RasterToVectorOp extends Operator
The raster to vector operator converts a raster to a vector.
  • Constructor Details

    • RasterToVectorOp

      public RasterToVectorOp()
  • Method Details

    • initialize

      public void initialize() throws OperatorException
      Description copied from class: Operator
      Initializes this operator and sets the one and only target product.

      The target product can be either defined by a field of type Product annotated with the TargetProduct annotation or by calling Operator.setTargetProduct(org.esa.snap.core.datamodel.Product) method.

      This method shall never be called directly. The framework calls this method after it has created an instance of this Operator. This will occur only once durting the lifetime of an Operator instance. If not already done, calling the Operator.getTargetProduct() will always trigger a call to the initialize() method.

      Any client code that must be performed before computation of tile data should be placed here.

      Specified by:
      initialize in class Operator
      Throws:
      OperatorException - If an error occurs during operator initialisation.
      See Also:
    • doExecute

      public void doExecute(ProgressMonitor pm) throws OperatorException
      Description copied from class: Operator
      Executes the operator.

      For operators that compute raster data tiles, the method is usually a no-op. Other operators might perform their main work in this method, e.g. perform some image analysis such as extracting statistics and other features from data products.

      Don't call this method directly. The framework may call this method

      1. once before the very first tile is computed, or
      2. as a result of a call to Operator.execute(ProgressMonitor).

      The default implementation only progresses the progress monitor.

      Overrides:
      doExecute in class Operator
      Parameters:
      pm - A progress monitor to be notified for long-running tasks.
      Throws:
      OperatorException - If an error occurs during computation of the target raster.
    • setSourceProduct

      public void setSourceProduct(Product sourceProduct)
      Set a new value for the sourceProduct.
      Overrides:
      setSourceProduct in class Operator
      Parameters:
      sourceProduct - the sourceProduct to set
    • setBandName

      public void setBandName(String bandName)
      Set a new value for the bandName.
      Parameters:
      bandName - the bandName to set