Select to view content in your preferred language

Slope calculation that excludes Elevation changes less than 15'

187
8
a week ago
Yeaton
by
Regular Contributor

Hello,

I'm looking to use raster calculator to select a range of slope values from a DEM and also exclude vertical changes that are less than 15 feet.  Is there a script that would accomplish this?  Thanks for any help.

 

Best,

Aaron Y.

0 Kudos
8 Replies
DanPatterson
MVP Esteemed Contributor

To identify the areas where elevation difference, is 15 feet... assume you mean within 1 cell width

you will need to use a Focal Range

Focal Statistics (Spatial Analyst)—ArcGIS Pro | Documentation

You will have to set those to null, prior to calculating slope

Set Null (Spatial Analyst)—ArcGIS Pro | Documentation

Slope (Spatial Analyst)—ArcGIS Pro | Documentation

Since that may be a bit of a pain, you might want to just calculate slope, then identify the slope values where 15 feet/cell width is the threshold and set those to null

Perhaps a comment as to your end goal would provide alternate/supportive suggestions.


... sort of retired...
0 Kudos
Yeaton
by
Regular Contributor

Hi Dan

Thankyou for those recommendation.

Ultimately we need a steep slope polygon that adheres to city code, which roughly stipulates that a steep slope qualifies if the percent rise is greater than or equal to 20% and the minimum elevation change is 15'

We will use the polygon layer to help evaluate zoning permits, building enforcement, etc.

0 Kudos
DanPatterson
MVP Esteemed Contributor

slightly different problem then, you will need zonal values not local since your ultimate locations are polygons (eg lots, neighborhoods, site plans)

Zonal Statistics (Spatial Analyst)—ArcGIS Pro | Documentation

It may take generating a couple of rasters to get the values you need (eg range).

You can use site specific areas (eg clip the dem using a polygon/area/zone) and derive the values you need.

On that note and from experience, you will still have to look at the elevation values within the area (maybe a quick contour map) and any directionality in the slope and location of abrupt changes and spread of values within


... sort of retired...
0 Kudos
Yeaton
by
Regular Contributor

Thanks again, Dan

0 Kudos
TaniaLopezCantu
Esri Contributor

 Hi Yeaton, 

From the conversation, I understand you would like to:

  • Extract cells with Slope (Percent Rise) values greater than 20%.
  • Extract cells with elevation change greater than 15 feet in the direction of the steepest drop.
  • Combine these results to create a raster highlighting areas that meet both criteria.

If this summary is correct, here’s one possible workflow you can follow (and later automate in a script):

  1. Run the Slope tool on your input DEM, selecting the Geodesic method and Percent Rise for the output measurement.
  2. Calculate elevation change from the slope raster using the Raster Calculator tool.
    • The equation for Slope in Percent rise is: Slope (percent rise) = (rise / run) × 100.
    • Solve for rise replacing the run variable with your DEM’s cell size. Note: This is an approximation. If the steepest slope is diagonal, the run distance will be slightly longer.
  3. Extract cells meeting your thresholds using the Con tool:
    • One extraction for slope values > 20%. Set Input true raster or constant value to 1. Leave all other parameters to default values.
    • Another for elevation change > 15 feet. Set Input true raster or constant value to 1. Leave all other parameters to default values.
  4. Combine the results using the Times tool or Raster Calculator tool.
    • This will produce a raster showing areas that meet both conditions.
    • If you need polygons, convert the raster using the Raster to Polygon tool.

Please give this a try and let me know if it produces the expected output.
While step 2 uses an approximation, I believe it should still be useful. If you need exact values, you may want to use a different approach using the Raster Cell Iterator. 

Note: There may be other ways to achieve your goal. If I’ve misunderstood any part of your workflow or missed a detail, please let me know. 

Thanks,
Tania

Tania Lopez-Cantu
0 Kudos
Yeaton
by
Regular Contributor

Hi Tania,

Thanks for the thorough workflow.  I'm not that familiar with raster calculations, or writing scripts for that matter.  For calculating the elevation change (in meters) would I use a Conditional operator? I tried the following expression but got an output raster with zero values:

Con(( "slope" == (meters/cell size)* 100), 1,0)

                     --Specifically--

 -- Con(("slope" == (4.571910/.499773)*100), 1,0)

Thanks!

Aaron Y.

0 Kudos
DanPatterson
MVP Esteemed Contributor

I wouldn't query for your exact threshold in the above equation, but one that is >=

 Con(("slope" >= (4.571910/.499773)*100), 1,0)

will give those values greater than or equal your critical value and assign a value of 1, otherwise 0


... sort of retired...
0 Kudos
Yeaton
by
Regular Contributor

Thanks Dan,  I'll give that a try

Best,

Aaron

0 Kudos