RasterFunction rasterFunction = RasterFunction.FromJson(jsonFunction);
// Get the raster function arguments
RasterFunctionArguments rasterFunctionArguments = rasterFunction.Arguments;
// Get the list of raster names from the raster function arguments.
IReadOnlyList<string> rasterNames = rasterFunctionArguments.GetRasterNames();
// Set the local file raster as a raster name argument.
rasterFunctionArguments.SetRaster(rasterNames[0], raster);
// Create a new raster based on the raster function.
Raster rasterWithFunction = new Raster(rasterFunction);
// Create a new raster layer from the raster with function applied.
RasterLayer rasterLayer = new RasterLayer(rasterWithFunction);
await rasterLayer.LoadAsync();
MyMapView.Map.OperationalLayers.Add(rasterLayer);
await MyMapView.SetViewpointGeometryAsync(rasterLayer.FullExtent);
1 个回复
朱新颖
赞同来自:
要回复问题请先登录或注册