Access Raster Functions via ArcGIS Pro SDK

114
0
06-08-2018 01:15 PM
Highlighted
New Contributor II

I would like to be able to clip rasters using a Raster Function rather than the geoprocessing library in my add-in.

Here is a snippet of the function I had used in ArcObjects to clip a raster using a geometry:

        public static IRasterDataset ClipToposInFrames(IRasterDataset topoDataset, IGeometry quadGeo, string clipName)
        {
            IClipFunctionArguments rasterFuncArgs = new ClipFunctionArguments() as IClipFunctionArguments;
            rasterFuncArgs.Raster = topoDataset;
            rasterFuncArgs.ClippingType = esriRasterClippingType.esriRasterClippingOutside;
            rasterFuncArgs.ClippingGeometry = quadGeo;

            IRasterFunction clipFunction = new ClipFunctionClass();
            IFunctionRasterDataset funcRasterDataset = new FunctionRasterDataset();
            IFunctionRasterDatasetName funcRasterDatasetName = new FunctionRasterDatasetName() as IFunctionRasterDatasetName;
            funcRasterDatasetName.FullName = clipName;
            funcRasterDataset.FullName = (IName)funcRasterDatasetName;
            funcRasterDataset.Init(clipFunction, rasterFuncArgs);
            return funcRasterDataset as IRasterDataset;
        }

Does anyone one know if a similary functionality is available in the ArcGIS Pro .NET SDK?

Tags (1)
Reply
0 Kudos
0 Replies