AnsweredAssumed Answered

Access Raster Functions via ArcGIS Pro SDK

Question asked by devonc1301 on Jun 8, 2018

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?