# Is there a tool in GIS to find the surface of a profile section in a DEM?

For example I have a DEM of river bed over which we made several profiles – eg sketch: http://prntscr.com/cqwile Now in cross section, it will look like this http://prntscr.com/cqwx59 .

Is there a way in GIS to find the surface of the green area by adding the DEM and a profile line from which it should be measured?

Or maybe set a Plane Height from which to start.

No such tool, I decided to make one.

In order to test it, I created 4 copies of the same polyline, and used DEM available and interpolate shape tool to convert them into 3D lines.

SCRIPT:

``````import arcpy
from math import hypot
inLines = r"C:\FELIX_DATA\SCRARCH\line3d.shp"

g=arcpy.Geometry()
with arcpy.da.UpdateCursor(inLines,("Shape@","WL","Channels","SectArea")) as cursor:
for shp,wl,channels,sArea in cursor:
part=shp.getPart(0); array=arcpy.Array();L=0
for i,p in enumerate(part):
if i==0:p1=p
else:
p2=p
L+=hypot(p1.X-p2.X,p1.Y-p2.Y)
p1=p
section=arcpy.Polyline(array)
LeftPoint=arcpy.Point(0,wl)
RightPoint=arcpy.Point(L,wl)
horizontal=arcpy.Polyline(arcpy.Array([LeftPoint,RightPoint]))
G=arcpy.FeatureToPolygon_management([section,horizontal],g)
channels=0;sArea=0
for pgon in G:
extent=pgon.extent
if 0.5*(extent.YMax+extent.YMin)>=wl: continue
channels+=1;sArea+=pgon.area
cursor.updateRow((shp,wl,channels,sArea))
``````

OUTPUT:

Note:

I used in memory geometries as inputs to mighty polygon constructing tool. I think this is very GIS solution to the task. Script will work on v.1.0 and later, not on 9.3.

• That looks awesome! One question, so for a single profile, i need several copies? or in the attribute table of the line there are several depths? – Stanisteanu Andrei Oct 10 '16 at 12:58
• Several copies of the same line. If it works for you mark as solves please – FelixIP Oct 10 '16 at 17:30

As far as I know, the only built-in functionality related to the profile section in ArcGIS Desktop is located in 3D Analyst toolbar via Profile Graph. You can read from the respective help page how to do this. This help page states that

you can create profiles on either a raster, triangulated irregular network (TIN), or terrain dataset surface.

I used this tool in version 10.3, and remember that it draws you a functional profile (as expected) but there are a few visualisation related limitations which make it hard to produce pleasing graphics.

We use Global Mapper for applications like this. They have a profile tool that allows you to at this in detail including cut and fill volumes.