Is AddSurfaceInformation_3D broken? Its giving very odd max slope values

682
4
04-06-2014 05:22 PM
TimBarnes
Occasional Contributor III
Calling the 'add surface information' tool through python gives unexpected results for maximum slope- Can anyone confirm it works as expected for them?

In a reasonably flat area, my max slope is being reported in the hundreds of percent.
My script/toolbar tool takes a polygon then applies surface information to its attribute table from an underlying DTM using arcpy.AddSurfaceInformation_3d, then lists those values.
The values reported for slope are significantly different to those listed if I clip the DTM with the polygon, create a slope raster, re-calculate statistics and view those values (i.e. in another area I get 43 degrees/93% vs 75.9 degrees/397%)

The polygons I've used for this test are both clean although one is a multi-part polygon.

ArcGIS Version 10.1 SP1
Tags (1)
0 Kudos
4 Replies
JeffreySwain
Esri Regular Contributor
I would consider the coordinate system you are using. If it is not projected and in the same units, you will have values like that.  So if it is a geographic coordinate system, then you would be doing a conversion of meters in elevation change/decimal degree. That is where I would start.
0 Kudos
TimBarnes
Occasional Contributor III
Thanks for the reply
Both my polygon feature class and DTM are in a projected coordinate system (New Zealand Tranverse Mercator, WKID: 2193)

I thought perhaps values at the edges may be causing some differences in my results due to raster vs vector boundaries but, for example, the maximum slope is near the middle of the area of interest so that doesn't explain it
Any other ideas? It just seems broken to me....I would expect at least similar results between the two methods.

edit: I've written both methods into the same tool to test
1) Take the polygon/area of interest, use the AddSurfaceInformation method, read the values that are written to the attribute table (slope values in percent), convert these to degrees.
Max slope = 77.0 degrees, Min slope = 0.3, average slope = 23.6

2) Take the polygon/area of interest, use the arcpy.sa.ExtractByMask method, read the values of the clipped raster using GetRasterProperties (already in degrees since my input slope raster was in degrees) Max slope = 39.4 degrees, Min slope = 1.4 degrees, average slope = 22.2 degrees

I've checked/verified my slope percent to slope degrees calculations and tried it on a range of different areas/polygons with similar results (i.e. different between the two methods)
0 Kudos
TimBarnes
Occasional Contributor III
Bump. Can anyone verify that the output between AddSurfaceInformation tool and looking at the statistics of a raster clipped to the same area of interest is similar?
0 Kudos
TimBarnes
Occasional Contributor III
It also seems that working in an 'in_memory' workspace creates a raster that gives bad statistics because it isn't clipped properly. Sigh.

Using extract by mask to a physical workspace clips a raster to a polygon and correctly assigns 'no-data' values to pixels outside the mask.

Using extract by mask to an in_memory workspace clips a raster to a polygon and assigns values of -128 to pixels outside the mask.

This means that summary values such as the average and minimum of the values covered by the mask are incorrect.
0 Kudos