Take a surface mesh

In[]:=
mr=
;

Extract its xyz point coordinates

In[]:=
xyz=MeshCoordinates[mr];

Contour the surface elevation data and define a section line

In[]:=
ListContourPlot[​​RandomSample[xyz,1000],Epilog->{Green,DropShadowing[],Line[sectionLine={{223000,609000},{229500,591000}}]}​​]
Out[]=

Get an interpolating function

In[]:=
ifun=Interpolation[xyz/.{x_,y_,z_}->{{x,y},z},InterpolationOrder->1]
Out[]=
InterpolatingFunction
Domain: 2.10×
5
10
,230000.,5.90×
5
10
,610000.
Output: scalar
Data not saved. Save now


Define xy points along the section line

In[]:=
sectionLineLength=EuclideanDistance@@sectionLine;​​sectionLineUnitVector=Normalize[Subtract@@@Reverse/@Transpose[sectionLine]];​​nSectionPts=10000;​​segmentLength=sectionLineLength/(nSectionPts-1)//N;​​xySectionPts=Table[sectionLine[[1]]+i*segmentLength*sectionLineUnitVector,{i,0,nSectionPts}]
Out[]=
{{223000.,609000.},{223001.,608998.},{223001.,608996.},{223002.,608995.},{223003.,608993.},{223003.,608991.},{223004.,608989.},
⋯9988⋯
,{229497.,591007.},{229498.,591005.},{229499.,591004.},{229499.,591002.},{229500.,591000.},{229501.,590998.}}
Full expression not available
(
original memory size:
1 MB)

Interpolate elevation (z) values at all xy points along the section line

In[]:=
xyzSectionPts=xySectionPts/.{x_,y_}->{x,y,ifun[x,y]};
In[]:=
Show[​​mr,​​Graphics3D[{Red,Thickness[Large],Line[xyzSectionPts]}]​​,Boxed->True​​,BoxRatios->{Automatic,Automatic,10000}​​,ImageSize->Large​​,SphericalRegion->True​​]
Out[]=

Plot the section in 2D

In[]:=
chzSectionPts=xyzSectionPts/.{x_,y_,z_}->{EuclideanDistance[{x,y},xySectionPts[[1,1;;2]]],z};​​ListLinePlot[chzSectionPts,Filling->Bottom,FrameLabel->{"Chainage","Elevation"}]
Out[]=