Forum

Author Topic: DEM-Manipulation along waterbodies  (Read 2853 times)

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
DEM-Manipulation along waterbodies
« on: March 17, 2025, 01:14:22 PM »
Hello everyone! I am a long time lurker, first time poster on this forum and have a question regarding DEM alteration for waterbodies. My apologies in advance in case this has been asked before - the forum search did not come up with anything similar.

The company i work for is often tasked with the creation of Orthomosaics and DEMs along rivers (= inclined plane).
Orthomosaics turn out great everytime, DEMs in combination with GCPs (precision under 3 cm) are great for land but expectedly vary a lot for the water-parts.

I know that it is possible to manipulate the DEM in postprocessing by creating polygons and the "edit DEM"-Button on rightclick.

My current workflow for the river is: take water levels with GPS every 100 m or so in the field. In Metashape i draw a polygon for every water level marker i have in a way that the polygons slightly overlap each other. I then select one polygon after the other, right click --> edit DEM and set that polygons height to the measured height. That way i get a somewhat inclined plane as water level.

This works fine for short stretches of a couple hundred meters, but is unfeasible for stretches of a few kilometers.

Is there any way to recalculate the DEM as an inclined plane with, say, 2 given points? That way i could take one water level at the start and one water level at the end of the project and just interpolate between these two points.

The DEM within the river does not have to be 100% accurate, i just want to get rid of all the mountains and valleys and have it somewhat accurate - best fit plane often puts the water level a couple of meters higher than it actually is because of all the distortion.

Thank you for reading, i am looking for your input!

Paulo

  • Hero Member
  • *****
  • Posts: 1589
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #1 on: March 17, 2025, 02:10:13 PM »
Hello,

something that occurs to me. If you can classify the point cloud and use only the ground points to generate a DTM then use the DTM over river as its elevation...
Best Regards,
Paul Pelletier,
Surveyor

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #2 on: March 17, 2025, 10:14:42 PM »
Hi Paulo,

thank you for your insight!

Did I understand correctly?
I just create a polygon along the empty river stretch that overlaps slightly with the DTM to the left and right to get the somewhat correct height of the water level and fill it with best fit plane?
Or did you mean something else by saying " then use the DTM over river as its elevation..."?

I can see that working with a DTM, but for a DEM with Vegetation along the river banks this might not work...

Paulo

  • Hero Member
  • *****
  • Posts: 1589
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #3 on: March 17, 2025, 10:45:12 PM »
Yeah, I think that would give you a smooth surface over the river body...

Or create a DTM from ground points only with interpolation...
Best Regards,
Paul Pelletier,
Surveyor

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #4 on: March 18, 2025, 04:53:42 PM »
Or create a DTM from ground points only with interpolation...

Thank you again!
Could you point me in the right direction, as i am not entirely sure what you are talking about.

Paulo

  • Hero Member
  • *****
  • Posts: 1589
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #5 on: March 18, 2025, 05:28:14 PM »
Hi,

what I am saying that if you classify your Point Cloud then use only classified ground points as basis for your DEM creation you should get something smoother along rivers...However if river banks are heavily forested then result will be not so good..

Tools>Point Cloud...>Classify Ground Points... then brown points are ground
Best Regards,
Paul Pelletier,
Surveyor

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #6 on: March 18, 2025, 06:02:33 PM »
Hi! Now I get what you are telling me.
I know about the point classification and about creating a DEM from only ground points, but that would leave me with no elevation for the water. To get that elevation, I would need to create a polygon which slightly overlaps the river banks and then do "best fit plane" in the edit dem-menu... That's what I tried to express in my first answer when I was talking about the "empty river stretch" ;).

I will give that a try and report back as soon as I have some results.


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15650
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #7 on: March 19, 2025, 11:13:53 AM »
Hello!

We have some ideas how to fill DEM within such shape. We'll try to create a script that you could try and check, if it allows to get acceptable result.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Duringar

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: DEM-Manipulation along waterbodies
« Reply #8 on: March 19, 2025, 01:47:46 PM »
Hi Alexey,

thank you very much for your reply - i am curious to try out said script once it is available!  :)

In the meantime, i tried Paulo's approach and got some interesting results.

From an existing Point Cloud, the workflow was like this:
1) Classify Ground Points via "Tools" --> "Point Cloud"
2) Classify Points via "Tools" --> "Point Cloud" (there does not seem to be an automatic function to classify points as water, so i did that manually with "Free-Form Selection" and "Assign class" in "Tools" --> "Point Cloud"
3) "Resize Region" to cover my sample
4) Build DEM from pointcloud with all points but water

The results are very promising and show a much smoother water surface, as the "Build DEM" command seems to interpolate all the missing parts on its own - no need to create a polygon which overlaps with the DEM on each side to get the heights.

The before image 1 (longitudinal) shows valleys and mountains on the water surface which differ up to 12 m, image 2 shows the lateral distribution of distortion. Interestingly, the overall water level in image 2 is pretty flat, even though it shows valleys and mountains. Image 3 shows the new water surface in longitudinal direction, image 4 the lateral water surface. In image 4, there seems to be quite an incline from the left bank to the right bank of about 0,5 m in water level, whereas the original (image 2) was kind of flat and more realistic when you ignore the distortion bumps.


So, to summarize my findings:

Generating a DEM from a classified Point Cloud without the water-class seems to be a feasible approach to my problem, even if it still requires to manually classify the waterbody.
Yet i am curious to see what Alexey and the Agisoft-Team come up with :)

Thank you all for your help!