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


IExtractionOp.Sample Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (SpatialAnalyst)  

IExtractionOp.Sample Method

Extracts the cells of a raster based on a sample.

[Visual Basic .NET]
Public Function Sample ( _
    ByVal locationDataset As IGeoDataset, _
    ByVal collectionOfRasters As IGeoDataset, _
    ByVal resampleType As esriGeoAnalysisResampleEnum _
) As ITable
[C#]
public ITable Sample (
    IGeoDataset locationDataset,
    IGeoDataset collectionOfRasters,
    esriGeoAnalysisResampleEnum resampleType
);
[C++]
HRESULT Sample(
  IGeoDataset* locationDataset,
  IGeoDataset* collectionOfRasters,
  esriGeoAnalysisResampleEnum resampleType,
  ITable** outTable
);
[C++]

Parameters locationDataset [in]
locationDataset is a parameter of type IGeoDataset collectionOfRasters [in]
collectionOfRasters is a parameter of type IGeoDataset resampleType [in]
resampleType is a parameter of type esriGeoAnalysisResampleEnum outTable [out, retval]
outTable is a parameter of type ITable

Product Availability

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

Remarks

locationDataset

an input Raster, RasterDataset, RasterBand, RasterDescriptor, FeatureClass or FeatureClassDescriptor which defines the cells to sample

Cells in the locationDataSet with valid values will be sampled.

collectionOfRasters

a multiband input Raster, RasterDataset, RasterBand, or RasterDescriptor whose values will be sampled based upon the locationDataset

resampleType

an esriGeoAnalysisResampleEnum specifing the resampling algorithm to be used when sampling a Raster

resample enumeration types are,

esriGeoAnalysisBilinear - bilinear interpolation

esriGeoAnalysisCubic - cubic convolution

esriGeoAnalysisNearest - nearest neighbor assignment

 

See Also

IExtractionOp Interface