I am trying to get some slope data into the attributes of a layer of polygons in ArcMap 10.5.1. I have a polygon layer representing various parts of a community (these polygons being varied shapes and sizes, representing sections of roads, buildings, plots of land, ponds, etc.) and I have a layer with the elevation data (which is very precise, 1 meter by 1 meter I think). I know I can use the Slope tool and the Flow Direction tool to get the slope and direction of flow for each location (represented by raster data). What I then need to do is take the flow direction and slope and attach them to corresponding polygons so that in the polygon layer, there will be two new columns in the attribute table with the data. Even though each polygon will contain multiple slopes since they are larger, I only want 1 corresponding value for slope and direction (an average of all values within would work, or just the values from the location closest to the center of the polygon). Is there a tool or method to do this directly in ArcMap, or does someone have advice on how to write a code that would do this (I have next to no experience in Python, only Matlab, but am starting to learn Python on my own)?
Zonal Statistics or better still... Zonal Statistics as Table will allow you to get the tabular data that you need which can be associated with polygon zones.
Hi Dan,
I have tried Zonal Statistics as a Table with no success.
Here is what I want to do: I would like to come up with a statistics table for the slopes of some selected areas in a raster.
This is what I've done:
I have a raster of zones I've extracted from another raster. I have calculated the areas of these zones, then Selected by Attributes some of these areas. I have used the Slope tool with an input raster for a particular band, and an output called slope; I got an output of the slopes for my selected areas in my Content pane. I need to bring this slope output into the attribute table for my extracted raster, so that I can use the Zonal Statistics as a Table tool on the extracted raster to generate my statistics table. How do I bring the slope output into my attribute table?
Did you try Add Z Information—Help | ArcGIS Desktop
The following Z properties are available:
Feature Geometry Z Properties Point
Z value of the point.
Multipoint
Point count and minimum, maximum, and mean Z values of all points in the multipoint record.
Polyline and Polygon
Vertex count and 3D distance of the line or polygon perimeter.
Minimum, maximum, and mean of the Z value and slope of the line or polygon perimeter.
Multipatch
Surface area and volume of a closed multipatch.
Minimum, maximum, and mean of the Z value and slope along the multipatch surface.
Slope is returned as a percentage value, or grade, and is calculated differently for each geometry type that supports this property.
- Slope values for line features and polygon perimeters are calculated along each segment:
- Minimum slope is obtained from the segment whose value is closest to 0, or horizontal grade.
- Maximum slope is obtained from the segment with the largest calculated value.
- Average slope is obtained by averaging the slope of all line segments after weighing each segment by its 3D length. This results in longer segments having greater influence over shorter segments.
- Slope values for multipatch features are calculated for each triangle face.
- Minimum slope is obtained from the face whose value is closest to 0, or horizontal grade.
- Maximum slope is obtained from the face with the largest value.
- Average slope is obtained by averaging the slope of all triangle faces after weighing each segment by its 3-dimensional area. This results in larger areas having greater influence on the resulting value over smaller ones.
- Slope values for polygon features are calculated along the edges using the same technique applied for line segments.
Volume can only be computed for closed multipatches. An open multipatch feature will return a value of 0.0. On the Solaris platform, a design limitation currently prevents the tool from determining if a multipatch is closed, resulting in volume measurements being calculated for all multipatches under the assumption they are closed.
Syntax
AddZInformation_3d (in_feature_class, out_property, {noise_filtering})
Parameter Explanation Data Type in_feature_classThe input features to process.
Feature Layer out_property[out_property,...]The Z properties that will be added to the attribute table of the input feature class. The following options are available:
- Z —Spot elevation of single-point feature.
- POINT_COUNT —Number of points in each multipoint feature.
- Z_MIN —Lowest Z value found in each multipoint, polyline, polygon, or multipatch feature.
- Z_MAX —Highest Z value found in each multipoint, polyline, polygon, or multipatch feature.
- Z_MEAN —Average Z value found in each multipoint, polyline, polygon, or multipatch feature.
- LENGTH_3D —3-dimensional length of each polyline or polygon feature.
- SURFACE_AREA —Total area of the surface of a multipatch feature.
- VERTEX_COUNT —Total number of vertices in each polyline or polygon feature.
- MIN_SLOPE —Lowest slope value calculated for each polyline, polygon, or multipatch feature.
- MAX_SLOPE —Highest slope value calculated for each polyline, polygon, or multipatch feature.
- AVG_SLOPE —Average slope value calculated for each polyline, polygon, or multipatch feature.
- VOLUME —Volume of space enclosed by each multipatch feature.
String