Converts a raster dataset to a polygon of cell boundaries.
Usage
The tool creates one polygon for each raster cell when the Block Size parameter value is 1. When a larger value is specified, the tool creates polygons for square blocks of cells.
The Input Raster parameter (in_raster in Python) can be integer or floating-point type.
The Block Size parameter value represents the number of cells in both the x- and y-directions. For example, a parameter value of 3 creates polygons for 3-by-3-cell blocks. Rectangular blocks such as 2-by-3 are not supported.
The minimum Block Size parameter value is 1. The maximum parameter value is the smaller of the analysis raster row count and column count.
The Add Attributes parameter specifies whether cell value and geodesic area attributes will be included in the output feature class.
When the Add Attributes parameter is checked, the output includes the raster cell value and geodesic area. The CellValue field type corresponds to the input raster pixel type.
NoData cells are converted to polygons. When attributes are added, the CellValue field for a NoData cell is null when the output format supports null values.
The tool supports single-band rasters. If a multiband raster is provided as input, only the first band is used to generate the output cell boundaries.
The following are example applications of the tool:
Create a polygon feature for each raster cell or cell block.
Inspect raster grid alignment, cell footprints, and analysis extent in vector form.
Overlay raster cells with feature layers for quality assurance, sampling, reporting, or cartographic display.
Transfer raster cell values to polygons for cell-based spatial analysis and querying.
Include NoData cell locations as polygons to evaluate raster coverage and data gaps.
The input raster that will be used to create the cell-boundary polygons.
Both integer and floating-point rasters are supported.
Raster Layer
Output Cell Boundaries
The output polygon feature class that will contain the raster cell boundaries.
Feature Class
Block Size
(Optional)
The number of raster cells in both the x- and y-directions that will be grouped into each output polygon.
A value of 1 creates one polygon per raster cell. The value must be greater than zero and less than or equal to the number of columns in the raster. The default is 1.
Long
Add Attributes
(Optional)
Specifies whether cell value and geodesic area attributes will be added to the output feature class.
Checked—Attributes will be added.
Unchecked—Attributes will not be added. This is the default.
Boolean
Area Unit
(Optional)
Specifies the unit that will be used for the geodesic area attribute.
This parameter is available when the Add Attributes parameter is checked. The default is Square Meters.
Square Kilometers—The area unit will be square kilometers.
Hectares—The area unit will be hectares.
Square Meters—The area unit will be square meters.
Square Statute Miles—The area unit will be square statute miles.
Square International Nautical Miles—The area unit will be square international nautical miles.
International Acres—The area unit will be international acres.
Square International Yards—The area unit will be square international yards.
Square International Feet—The area unit will be square international feet.
Square US Survey Miles—The area unit will be square US survey miles.
Square US Survey Nautical Miles—The area unit will be square US survey nautical miles.
US Survey Acres—The area unit will be US survey acres.
Square US Survey Yards—The area unit will be square US survey yards.
Square US Survey Feet—The area unit will be square US survey feet.
The input raster that will be used to create the cell-boundary polygons.
Both integer and floating-point rasters are supported.
Raster Layer
out_cell_boundaries
The output polygon feature class that will contain the raster cell boundaries.
Feature Class
block_size
(Optional)
The number of raster cells in both the x- and y-directions that will be grouped into each output polygon.
A value of 1 creates one polygon per raster cell. The value must be greater than zero and less than or equal to the number of columns in the raster. The default is 1.
Long
add_attributes
(Optional)
Specifies whether cell value and geodesic area attributes will be added to the output feature class.
ADD_ATTRIBUTES—Attributes will be added.
NO_ATTRIBUTES—Attributes will not be added. This is the default.
Boolean
area_unit
(Optional)
Specifies the unit that will be used for the geodesic area attribute in Python.
This parameter is available when the add_attributes parameter is set to ADD_ATTRIBUTES. If no unit is specified, the default SQUARE_METERS unit will be used.
SQUARE_KILOMETERS—The area unit will be square kilometers.
HECTARES—The area unit will be hectares.
SQUARE_METERS—The area unit will be square meters.
SQUARE_MILES_INT—The area unit will be square statute miles.
SQUARE_NAUTICAL_MILES—The area unit will be square international nautical miles.
ACRES—The area unit will be international acres.
SQUARE_YARDS—The area unit will be square international yards.
SQUARE_FEET_INT—The area unit will be square international feet.
SQUARE_MILES_US—The area unit will be square US survey miles.
SQUARE_NAUTICAL_MILES_US—The area unit will be square US survey nautical miles.
ACRES_US—The area unit will be US survey acres.
SQUARE_YARDS_US—The area unit will be square US survey yards.
SQUARE_FEET_US—The area unit will be square US survey feet.
String
Code sample
RasterToCellBoundaries example 1 (Python window)
This example creates one polygon for every raster cell and adds the cell value and geodesic area attributes.