Polygon to Raster
Function Description: Converts polygon features to a raster dataset.
How It Works
The following introduces how to specify cell values in a raster dataset under various conditions when using the Polygon to Raster tool.
When multiple features fall into a single cell, there are three methods to control how the value is assigned to the cell. These methods are described as follows.
Cell Center Method
If no priority is specified, and:
- The cell center falls within only one feature, the attribute of that feature will be assigned to the cell.
- The cell center falls within multiple features, the feature with the smallest FID is selected.
If priority is specified, and:
- The cell center falls within only one feature, the attribute of that feature will be assigned to the cell.
- The cell center falls within multiple features, and:
- The features have different priority values, the feature with the highest priority is selected.
- The priorities are the same, the feature with the smallest FID is selected.
Maximum Area Method
If no priority is specified, and:
- Only one feature overlaps with the cell, the feature will be selected only if it overlaps at least 50% of the cell.
- Multiple features overlap with the cell, the feature with the largest overlapping area must cover more area than the portion of the cell not covered by any feature; otherwise, the cell will be assigned a NoData value.
- Only one feature has the largest area, that feature is selected.
- Multiple features have equal areas, the feature with the smallest FID is selected.
If priority is specified:
- The feature with the highest positive priority value is always selected for conversion, regardless of the size of the overlapping area.
- If the overlapping area between the features and the cell is less than 50%, and:
- The priority value is greater than zero, the feature is considered.
- The priority value is equal to zero, the feature is not considered.
- Only one feature has the largest area, that feature is selected.
- Multiple features have the same maximum area, and:
- Their priorities differ, the feature with the highest priority is selected.
- Their priorities are the same, the feature with the smallest FID is selected.
Maximum Combined Area Method
For this method, combined features are treated as a single feature, with the FID taken from the smallest value among the combined features, and the priority taken from the highest value among the combined features.
If no priority is specified, and:
- Only one feature overlaps with the cell, the feature will be selected only if it overlaps at least 50% of the cell.
- Only one feature has the largest area, that feature is selected.
- Multiple features have equal areas, the feature with the smallest FID is selected.
If priority is specified:
- The feature with the highest positive priority value is always selected for conversion, regardless of the size of the overlapping area.
- If the overlapping area between the features and the cell is less than 50%, and:
- The priority value is greater than zero, the feature is considered.
- The priority value is equal to zero, the feature is not considered.
- Only one feature has the largest area, that feature is selected.
- Multiple features have the same maximum area, and:
- Their priorities differ, the feature with the highest priority is selected.
- Their priorities are the same, the feature with the smallest FID is selected.
Examples of using different options for cell value assignment methods
A diagram illustrating six polygons overlapping the same cell
Data Description
- Any feature class containing polygon features can be converted to a raster dataset.
- The type of input field determines the type of the output raster. If the field is integer, the output raster will also be integer; if the field is floating-point, the output raster will be floating-point.
- If a pixel size is specified numerically, the tool will use it directly for the output raster.
- This tool complements the Raster to Polygon tool, which converts a raster to a polygon feature class.
- When multiple features overlap a pixel, this tool provides more comprehensive control over pixel value assignment compared to the Feature to Raster tool.
- When converting overlapping polygons, you might want to assign the polygon with the smallest area to the pixel. An easy method is to add a field to the input feature class, calculate the reciprocal of each polygon's area, and then use this field as the Priority Field when running the tool.
- For data formats that support Null values, such as file geodatabase feature classes, Null values will be ignored when used as input.
Steps
- Find the Polygon to Raster tool under the toolbox, and double-click to open the tool window.
Polygon to Raster
Parameter Description:
- Input Features: The polygon feature dataset to be converted to a raster.
- Value Field: The field used to assign values to the output raster. It can be any numeric field from the attribute table of the input feature dataset.
Cell Assignment Type (Optional): Determines the method for assigning values to cells when multiple features fall within a cell.
- Cell Center — The attributes of the feature overlapping the cell center determine the value assigned to the cell.
- Maximum Area — The feature with the largest area within the cell determines the value assigned to the cell.
- Maximum Combined Area — If multiple features in a cell have the same value, their combined area is calculated. The feature with the largest combined area determines the value assigned to the cell.
Priority Field: This field determines which feature should take precedence over others in the cell. When used, regardless of the Cell Assignment Type chosen, the feature with the highest positive priority value is selected for conversion.
- Cell Size: The cell size of the output raster being created.
- NoData Value: The value used to specify invalid areas in the raster.
- Output Raster Dataset: The raster dataset to be created.