This document is archived and information here might be outdated.  Recommended version.


IExtractionOp Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (SpatialAnalyst)  

IExtractionOp Interface

Provides access to members that control the extraction operations. Note: the IExtractionOp interface has been superseded byIExtractionOp2. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Spatial Analyst Extension.

Members

Description
Method Attribute Extracts the cells of a raster based on a logical query.
Method Circle Extracts the cells of a raster based on a circle.
Method Points Extracts the cells of a raster based on points.
Method Polygon Extracts the cells of a raster based on a polygon.
Method Raster Extracts the cells of a raster whose corresponding cells in the mask raster have valid value.
Method Rectangle Extracts the cells of a raster based on a rectangle.
Method Sample Extracts the cells of a raster based on a sample.

CoClasses that implement IExtractionOp

CoClasses and Classes Description
RasterExtractionOp A mechanism for performing operations that extract cells from rasters.

Remarks

Spatial Analyst methods do not maintain colormaps in the output raster, therefore you can expect a loss of the color map when using methods of iExtractionOp.  This happens during analysis where a new raster is being created and the input color map information is not carried over to the result. However, you can obtain and alter a raster dataset’s color map.

Assuming that pRasterDataset (IRasterDatset) and pColorMap (iRasterColorMap) have been created, the following code snippet applies a color map from one raster dataset to another.

'Get color map from Raster
Dim pColorMap As IRasterColormapSet
pColorMap =  AccessRasterColorMap(pRasterDataSet01)

'Alter color map of raster02 to match raster01
Dim pRasterDatasetEdit As IRasterDatasetEdit
Set pRasterDatasetEdit=RasterDataSet02

pRasterDatasetEdit.AlterColormap pColorMap

 

Click on the following link to learn more about working with Raster Data:  DataSourcesRaster Library Overview.

 

.NET Snippets

Create ExtractOp Circle Raster | Create ExtractionOp Attribute Raster