When using the SAGA algorithm to create Cross profiles of depths from a DEM is there any way to add XY values to each of the depth values created and stored in the attribute table?
1 Answer
Two tools in Processing Toolbox - Vector geometry
will be useful:
(1) Use Extract vertices tool on your Cross Profiles
line layer. This will create a point layer (usually named "Vertices") with all relevant information per each vertex. You will find new attribute vertex_index. Since the vertex_number starts from zero, please add one (1) to find the matching Pxx number produced by the SAGA Cross Profile algorithm.
(2) Then use Add geometry attributes tool to add X, Y, and the depth values (namely xcoord
, ycoord
, and zcoord
).