Analyses the values of a raster within each polygon of the input polygon dataset. Calculates statistics for each polygon and adds them in the attribute table of the output.
Parameters
| Expression | Explanation |
|---|---|
| Function Name | ZonalStatistics |
| <InputPolygons> | A String - full path to the Input Polygon dataset. |
| <OutputPolygons> | A String - the full path to the output polygon layer. |
| <InputRaster> | A String - full path to the input raster dataset. |
| {Prefix} | A String (maximum 3 characters) representing the prefix. See description above. |
ETSPath used in the table below is the full path to ETSRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETSurface\ETSRun.exe")
| Language | Syntax |
|---|---|
| Python | subprocess.call([ETSPath, "ZonalStatistics", "InputPolygons", "OutputPolygons", "InputRaster", "Prefix"]) |
| .NET using ETSRun.exe | StartInfo.FileName = ETSPath StartInfo.Arguments = "ZonalStatistics" "InputPolygons" "OutputPolygons" "InputRaster" "Prefix" |
| .NET using ETSOutX.dll | ZonalStatistics(InputPolygons, OutputPolygons, InputRaster, Prefix) |
| ArcPy | arcpy.ZonalStatistics("InputPolygons", "OutputPolygons", "InputRaster", "Prefix") |
Notes: