Polygon Example
' Create the RasterExtractionOp object
Dim pExtractionOp As IExtractionOp
Set pExtractionOp = New RasterExtractionOp
' Declare the input dataset object
Dim pInputDataset As IGeoDataset
' Call function to open a dataset
Set pInputDataset = OpenRasterDataset ("D:\Spatialdata", "inputdata")
' Declare a polygon object
Dim pPolygon As IPolygon
' Call function to get a selected polygon from graphics layer
Set pPolygon = GetSelectedPolygonFromLayer()
' Declare the output dataset
Dim pOutputDataset As IGeoDataset
' Call the method
Set pOutputDataset = pExtractionOp.Polygon (pInputDataset, pPolygon, True)