Subscribe to this thread
Home - General / All posts - Modelling user defined slopes in a DEM
LandSystems48 post(s)
#15-Jul-20 05:38

I am attempting to construct ‘as built’ flood control embankments into a DEM using information listed in a GIS layer of embankment centrelines. My purpose is to then subtract high resolution LiDAR of the same embankment from the ‘as built’ model to determine how and where the real world embankment deviates from the original design. We can use this information to identify defects and to assess the approximate volume of material needed to rectify the design.

I have got a fair bit of the way in M9, but need a bit of help with the next step which is to derive a DEM representation of the embankment slope away from the crest edge line (supplied). Within the dataset, the embankment slope is provided as a gradient rise per meter [BNK_SLOPE_GRAD_M_M] (see attribute list below).

To complicate matters, crest height of an embankment can vary along its length and is defined in the source dataset by crest a start and end attribute ([CREST_START], [CREST_END]). This means that the slope DEM needs to be derived for each segment along the embankment length to accommodate the varying crest heights ([BANK_HT]).

Embankments are also commonly asymmetrical in cross-section with a different bank slope for each side (See Clipboard-1 image for embankment cross-section schematic). I did have a method to produce a user defined DEM slope accounting for change in crest elevation on either side of a line in M8, but I can’t locate it at the moment. Ideally I would like to produce the specified DEM slope on one side of the line, but it doesn’t matter if it is on both sides initially as I can mask it later.

I want to achieve this in M9 for performance which has now overtaken M8 as my GIS of choice. I have had a couple of cracks at achieving this first in vector mode with line spacings and heights to achieve the correct slope when joined to the DEM, but my attempts didn’t deal with sharp bends in the embankment (See Clipboard-2 image)

If anyone is able to offer any suggestions of how to go about this in M9, I would be very grateful.

[BRANCH]Segment index for the embankment

[ASSET_ID]Asset identifier

[MAXID]The maximum segment index for the embankment

[CREST_M]The width of the crest of the embankment (not needed for this part)

[CREST_START]The height of the embankment crest at segment index start (0)

[CREST_END]The height of the embankment crest at segment index end (309)

[BNK_SLOPE_GRAD_M_M] The gradient of the slope in rise (m) per meter

[BANK_HT]The calculated segment crest height

Attachments:
Clipboard-1.png
Clipboard-2.png
M9 FORUM DATA.mxb

tjhb

9,475 post(s)
#15-Jul-20 05:50

What is the question Dan?

And why do you need to use slope(s)? Why not just subtract one raster from another?

LandSystems48 post(s)
#15-Jul-20 06:19

Hi Tim, when I say slope, I don't mean a grid of slope, I mean construct the sloping bank of the embankment as a DEM from the crest edge (the line supplied) to the toe of the embankment. The slope of this DEM is defined by the attribute [BNK_SLOPE_GRAD_M_M], so in the example we know that the slope of the bank is a drop of 0.4m every 1m horizontally.

My apologies I realize that I didn't explain what I am trying to create very well in my initial post and I am not sure I am doing much better now. I will see if I can find a picture to help.

Edit: I am trying to create the red part of the image as a DEM using the slope attribute

Attachments:
ClipBoard-1 Modified.png

LandSystems48 post(s)
#15-Jul-20 06:34

Here is another example from the M8 script I had which took a line with heights that varied along its length and an embankment slope value, and constructed the embankment into the DEM. I am essentially wanting to replicate this in M9 but taking the desired embankment slope and the crest height from each segment in the line feature in the M0 project.

Attachments:
Clipboard-3.png

tjhb

9,475 post(s)
#15-Jul-20 07:35

Cool, this is fun. :)

LandSystems48 post(s)
#15-Jul-20 23:00

I have managed to find a early M8 version of the code that produced Clipboard-3 image above. This version doesn't seem to correctly use the path height at each segment, though I know that I had this working.

Attachments:
M8 FILL WORKING.map

mikedufty

868 post(s)
#22-Jul-20 01:19

I don't have an answer, but very interested to see how you go. This is one of the few things I still need to use my 15 year old copy of AutoCAD civil 3D for, and I would really like to not have to use it any more. It is really good when it works, but crashes more often than not, and import and export are a pain.

mikedufty

868 post(s)
#22-Jul-20 01:45

I think Tim even offered to help me with this several years ago and I've been too slack to provide him with details of what I want to do. Usually it is quite similar to what Landsystems is doing. Either a stockpile where I specify a level surface and want to project down at a slope to the landscape, or a pit where I have a boundary and want to project down at a slope to a floor level.

I suspect that resolving inside corners is not mathematically that easy as it seems to contribute to the worst crashes, but I can do it manually so can't be that hard.

I struggle with SQL but I think yours is travelling along the line building cones from each point, which seems like it should work nicely to achieve nothing steeper than the specified slope, which is what I'm after.

LandSystems48 post(s)
#28-Jul-20 22:28

Thanks for your interest Mike, this is a bit of a side/hobby project for me at work that I believe would be of great use to our flood control engineers. Unfortunately, I have had to park it again for a while as it has been overtaken again by other tasks. Thinking about it more however, I am pretty sure that I can now fix the problems with my earlier attempt (Clipboard-2 image in the initial post), but I suspect that there will be a more efficient tile based approach available in M9.

Anyway, rest assured that I will share here if I manage to achieve my goal

adamw


9,445 post(s)
online
#07-Sep-20 13:07

(Going through all the threads I missed before.)

The MXB contains line segments with the fields for crest width / heights, etc, that you mentioned.

You want to create a raster based on that data.

It seems like the straightforward solution would be to take each segment and create points for corners of the shape in CLIPBOARD-1.PNG, perhaps repeating them every X meters so that longer segments generate more points, and then to interpolate them using triangulation.

The created raster will fill pixels that are far from the line segments, but you can remove them by (a) creating a geometry shape (a set of buffers) covering pixels you want to keep, then (b) creating an inverse of that shape so that you have the shape covering pixels you want to remove, then (c) joining that shape to the interpolated image and setting the values of pixels under that shape to -1000 or something like this (create a numeric field named Z in the drawing, set it to -1000, then create a map with the image and the drawing, make the image layer active, invoke Edit - Join, select the drawing as the layer to join, set join parameters to Channel 0 - minimum - Z, keep both 'Clear image pixels' and 'Resize image' unchecked, click OK), then (d) joining the resulting image to the original image using Maximum (if -1000 was low enough, a maximum of original value and -1000 will return the original value).

We will make it much easier with per-pixel selections in the future.

LandSystems48 post(s)
#10-Sep-20 02:33

Thank you so much for looking into this for me Adam. I will give your suggestions a go when I come up for air next and report back how get on.

Much appreciated

LandSystems48 post(s)
#10-Nov-20 07:05

I have made some good progress with this thanks to your suggestions Adam and now have a query stack which initially builds a vector model of an embankment using the attribute information in a flood control structure dataset (Clipboard-1).

It then uses the TIN interpolator to grid this model into an 'as built' embankment model (Clipboard-2).

Finally it subtracts the local LiDAR from the 'as built' model, themes and contours the result to quickly show areas along the embankment where more material may be required to return banks to their original condition (Clipboard-3).

Though the result is only indicative, it is none the less useful management information and astoundingly quick to produce in Manifold 9. It has also provided a great learning project as while I have undoubtedly achieved it in an inelegant way, there are lots of different elements of working with tables, joins, masks and between raster and vector data.

Attachments:
Clipboard-1.jpg
Clipboard-2.jpg
Clipboard-3.jpg
Clipboard-4.jpg

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