Class SubsetOp


  • @OperatorMetadata(alias="Subset",
                      category="Raster",
                      authors="SNAP Developers",
                      version="1.3",
                      copyright="(c) 2011 by Brockmann Consult",
                      description="Create a spatial and/or spectral subset of a data product.")
    public class SubsetOp
    extends Operator
    This operator is used to create either spatial and/or spectral subsets of a data product. Spatial subset may be given by pixel positions (parameter region) or a geographical polygon (parameter geoRegion). Subsets of band and tie-point grid are given by name lists (parameters bandNames and tiePointGridNames).
    Since:
    BEAM 4.9
    • Constructor Detail

      • SubsetOp

        public SubsetOp()
    • Method Detail

      • getTiePointGridNames

        public String[] getTiePointGridNames()
      • setTiePointGridNames

        public void setTiePointGridNames​(String[] tiePointGridNames)
      • getBandNames

        public String[] getBandNames()
      • setBandNames

        public void setBandNames​(String[] bandNames)
      • setCopyMetadata

        public void setCopyMetadata​(boolean copyMetadata)
      • setRegion

        public void setRegion​(Rectangle region)
      • setSubSamplingX

        public void setSubSamplingX​(int subSamplingX)
      • setSubSamplingY

        public void setSubSamplingY​(int subSamplingY)
      • getGeoRegion

        public org.locationtech.jts.geom.Geometry getGeoRegion()
      • setGeoRegion

        public void setGeoRegion​(org.locationtech.jts.geom.Geometry geoRegion)
      • computeTile

        public void computeTile​(Band band,
                                Tile targetTile,
                                ProgressMonitor pm)
                         throws OperatorException
        Description copied from class: Operator
        Called by the framework in order to compute a tile for the given target band.

        The default implementation throws a runtime exception with the message "not implemented".

        This method shall never be called directly.

        Overrides:
        computeTile in class Operator
        Parameters:
        band - The target band.
        targetTile - The current tile associated with the target band to be computed.
        pm - A progress monitor which should be used to determine computation cancellation requests.
        Throws:
        OperatorException - If an error occurs during computation of the target raster.
      • computePixelRegion

        public static Rectangle computePixelRegion​(Product product,
                                                   org.locationtech.jts.geom.Geometry geometryRegion,
                                                   int numBorderPixels)
        Non-API (yet).