com.supermap.analyst.spatialanalyst

Class RasterClip

  • java.lang.Object
    • com.supermap.analyst.spatialanalyst.RasterClip


  • public class RasterClip
    extends java.lang.Object
    Raster clip class. Clip the raster or image map within specified range.
    • Method Detail

      • clip

        public static Dataset clip(Dataset sourceDataset,
                                   GeoRegion userRegion,
                                   boolean isClipInRegion,
                                   boolean isExactClip,
                                   Datasource targetDatasource,
                                   java.lang.String targetDatasetName)
        Clip the dataset and save the result as another dataset. It supports clipping image dataset.
        Parameters:
        sourceDataset - The raster dataset to clip.
        userRegion - The clip area.
        isClipInRegion - Whether to clip the internal part.
        isExactClip - Whether to accurately clip.
        targetDatasource - Output datasource.
        targetDatasetName - The target dataset name.
        Returns:
        the result dataset.
      • clip

        public static boolean clip(DatasetImage sourceDataset,
                                   GeoRegion userRegion,
                                   boolean isClipInRegion,
                                   java.lang.String targetFileName,
                                   RasterClipFileType targetFileType)
        Raster clip. Save as a image file.
        Parameters:
        sourceDataset - The raster dataset to clip.
        userRegion - The clip area.
        isClipInRegion - Whether to clip the internal part.
        targetFileName - The target image name and the absolute path.
        targetFileType - Output image file type
        Returns:
        Whether it is successful or not to clip raster.
      • split

        public static boolean split(Dataset sourceDataset,
                                    GeoLine splitLine,
                                    Datasource targetDatasource,
                                    java.lang.String targetRightDatasetName,
                                    java.lang.String targetLeftDatasetName)
        Raster split. It supports image dataset
        Parameters:
        sourceDataset - The raster dataset to split.
        splitLine - Split line
        targetDatasource - Output datasource.
        targetLeftDatasetName - The dataset name in the left part of the line.
        targetRightDatasetName - The dataset name in the right part of the line.
        Returns:
        Whether it is successful
      • addSteppedListener

        public static void addSteppedListener(SteppedListener listener)
        Add a listener of the progress.
        Parameters:
        listener - The listener. Please refer toSteppedListener
      • removeSteppedListener

        public static void removeSteppedListener(SteppedListener listener)
        Remove a listener of the progress.
        Parameters:
        listener - The listener. Please refer toSteppedListener