Extracts the cells of a raster based on a polygon.
[Visual Basic .NET] Public Function Polygon ( _ ByVal geoDataset As IGeoDataset, _ ByVal Polygon As IPolygon, _ ByVal selectInside As Boolean _ ) As IGeoDataset
[C#] public IGeoDataset Polygon ( IGeoDataset geoDataset, IPolygon Polygon, bool selectInside );
[C++]
HRESULT Polygon(
IGeoDataset* geoDataset,
IPolygon* Polygon,
VARIANT_BOOL selectInside,
IGeoDataset** outGeodataset
);
[C++]Parameters
geoDataset [in]geoDataset is a parameter of type IGeoDataset
Polygon [in]Polygon is a parameter of type IPolygon
selectInside [in] selectInside is a parameter of type VARIANT_BOOL outGeodataset [out, retval]outGeodataset is a parameter of type IGeoDataset
Product Availability
Remarks
geoDataset |
an input Raster, RasterDataset, RasterBand, or RasterDescriptor The geoDataset identifies the cell values which will be selected inside or outside of a specified polygon. |
Polygon |
an IPolygon defining polygon for the selection criteria The coordinates are specified in map units and are in the same units as the geoDataset. |
selectInside |
a Boolean identifying which cells should be selected, those contained in or external to the input polygon If True, the cells inside the input Polygon should be selected and written to the output Raster. All cells outside the polygon will receive NoData on the output Raster. If False, the cells outside the input polygon should be selected and written to the output Raster. All cells inside the polygon will receive NoData on the output Raster. |
- The method returns a reference to a Raster object.
- Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.