Subscribe to this thread
Home - General / All posts - DEM slope with arrows
sgaiji25 post(s)
#22-Jul-19 15:42

On Manifold 8, how to get a map of the maximum slopes of a DEM, visualized with arrows?

I wish I could choose the density of the number of arrows and their size according to the value of the slope.

On the attached image, I get this layer within QGIS thanks to a SAGA function.





236 post(s)
#22-Jul-19 19:08

Very doable with some manipulation of the data.

Do you have the Surface Tools extension? This would be necessary.

The image from QGIS shows the arrows in an overlaying grid that probably isn't the same granularity as your DEM layer. So at some point you would need to create such a grid of points that house the aspect (direction of water flow) and slope calculation. Then you could display the arrows with size and rotation that reflect your data.

You say you wish to choose the density of the number of arrows. Can you elaborate on this? The example given shows the grid, but not the change in "density".


236 post(s)
#23-Jul-19 00:38

I did up an example .map file to illustrate.

The Slope and Aspect was calculated and stored with the Elevation from a Query derived from the lidar elevation. This let me link two surfaces to give illustration and keep file size down. I used a window parameter of 5 (11x11 spatial pixels around each calculated both for slope and aspect to smooth some of the noise.)

I generated a 100m grid and created them onto a drawing. I edited the grid drawing's Table to allow for aspect, slope, and height keeping the data type the same. This allowed me to use the Drawing - Transfer Heights... menu to assign the aspect, slope, and height to the points. I didn't really need the elevation to get transfered but brought it along. Then a couple of thematic changes to the points style to use these new columns to represent the slope as magnitude of arrow, and the aspect to show direction. One caveat, I manually changed the negative calculated aspect values in the grid drawing to cardinal direction by adding 360 to those <0deg.

To make a denser grid is almost trivial as the procedure is the same. To add further refinement of the aspect, slope (including the cardinal direction change) this can also be done in the query. There may be other ways to tackle this.

The data is a subset of the Douglas County, KS, USA lidar data at 2m resolution.

I hope this gives you some ideas that may help your project.


sgaiji25 post(s)
#23-Jul-19 14:46

Nice work !


sgaiji25 post(s)
#23-Jul-19 17:24

Just a little question : what is the query you used to calculate the slope and aspect of your DEM data ?


236 post(s)
#23-Jul-19 18:51

In Mfd8, any surface can display the Aspect and Slope as an intrinsic part, you can show this in the View - DisplayOptions menu, under the Display pull-down. You can also save these as separate surfaces with the Edit - Save Channel menu. To save on space for uploading, I embedded the calculations of the Slope and Aspect in the one query "Calc_Elev_Slope_Aspect". Editing this, you will find a line "SlopeHeight([DG_Cty_Elevation Surface], [E].[X (I)], [E].[Y (I)], 5) as Slope_deg" calculating the Slope for each pixel augmented by the 5 parameter for the window. So for each pixel it is calculating the average slope for an 11x11 pixel area then storing this back at the X,Y reference. Similar for the AspectHeight() line. The resulting table can then be linked as two separate drawings (notice the database cylinder addition to the icon). These can then be used to perform further analysis on, and overlaid in the map, with some transparency, for visualization.

389 post(s)
#23-Jul-19 17:21

This is awesome, thanks for sharing.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.