Zonal Geometry (Spatial Analyst Tools)
Summary
Calculates the specified geometry measure (area, perimeter, thickness, or the characteristics of an ellipse) for each zone in a dataset.
Illustration

OutRas = ZonalGeometry(InRas1,"VALUE","AREA")Usage
A zone is defined as all areas in the input that have the same value. The areas do not have to be contiguous. Both rasters and features can be used for the zone input.
The Output cell size parameter value (
cell_sizein Python) can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, it is derived from the Cell Size environment if it has been specified. If the parameter cell size or the environment cell size have not been specified, the default output cell size is determined based on the type of input dataset as follows:If the input dataset is a raster, the cell size of the dataset is used.
If the input dataset is a feature and the Snap Raster environment has been set, the cell size of the snap raster is used. If no snap raster is set, the cell size is calculated from the shorter of the width or height of the extent divided by 250 in which the extent is in the output coordinate system specified in the environment.
If the cell size is specified using a numeric value, the tool will use it directly for the output raster.
If the cell size is specified using a raster dataset, the parameter will show the path of the raster dataset instead of the cell size value. The cell size of that raster dataset will be used directly in the analysis, provided the spatial reference of the dataset is the same as the output spatial reference. If the spatial reference of the dataset is different than the output spatial reference, it will be projected based on the specified Cell Size Projection Method value.
If the Input Raster or Feature Zone Data parameter value (
in_zone_datain Python) has overlapping polygons, the zonal analysis will not be performed for each individual polygon. Since the feature input is converted to a raster, each location can have only one value.An alternative method is to process the zonal operation iteratively for each of the polygon zones and collate the results.
The default Zone Field parameter value (
zone_fieldin Python) will be the first available integer field. If no other valid fields exist, the ObjectID field (for example,OIDorFID) will be the default.The data type of the output raster for area, perimeter, and thickness geometry types will be floating point. The output raster for centroid geometry type will be integer.
In the attribute table of the output raster for the centroid option, the value field always precedes the fields containing the calculations for the ellipsoidal approximation of the zones. The value field contains the values of the zones defined by the zone dataset.
All the results in the attribute table of the output raster for the centroid option are presented in map units, except for the
ORIENTATIONitem, which is in degrees in a range of 0 to 180. The orientation is defined as an angle between the x-axis and the major axis of the ellipse. The values of the orientation angle increase counterclockwise, starting at 0 in the east (horizontal, to the right) and going through 90 when the major axis is vertical.If a particular zone consists of only one cell or if the zone is a single square block of cells, the orientation of the ellipse (which, in this case, is a circle) is set to 90 degrees.
The geometry type Thickness generates temporary intermediate rasters that are deleted when processing completes. If the available disk space is insufficient, it may cause the tool to fail.
When the output raster format is
.crf, this tool supports the Pyramid raster storage environment. Pyramids will be created in the output by default. For any other output format, this environment is not supported, and pyramids will not be created.See Analysis environments and Spatial Analyst for additional details about the geoprocessing environments that apply to this tool.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Raster or Feature Zone Data |
The dataset that defines the zones. The zones can be defined by an integer raster or a feature layer. |
Raster Layer; Feature Layer |
|
Zone Field |
The field that contains the values that define each zone. It must be an integer field of the zone dataset. |
Field |
|
Geometry Type (Optional) |
Specifies the geometry type that will be calculated.
|
String |
|
Output Cell Size (Optional) |
The cell size of the output raster that will be created. This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more details. |
Analysis Cell Size |
Return value
| Label | Explanation | Data type |
|---|---|---|
|
Output Raster |
The output zonal geometry raster. |
Raster |
Environments
Auto Commit, Cell Size, Cell Size Projection Method, Compression, Current Workspace, Extent, Geographic Transformations, Mask, Output CONFIG Keyword, Output Coordinate System, Parallel Processing Factor, Pyramid, Scratch Workspace, Snap Raster, Tile Size
Licensing information
- Basic: Requires Spatial Analyst
- Standard: Requires Spatial Analyst
- Advanced: Requires Spatial Analyst