How to wrap perfectly a polygon mesh on terrain mesh?

I have two objects (mesh): the first one is a grid that represents the elevation of the terrain and the second is a polygon that represents the river. What I’d like to do to is to displacing (and warp) perfectly the polygon of the river on the mesh of terrain.

Here the situation:

I have been trying to add the Shrinkwrap to the river polygon but the result isn’t what I was expecting: in some portions the river is on the terrain but in some else it’s below. It’s like the river’s polygon it’s positioned on a fixed altitude without following the terrain.

The result of applying the Shrinkwrap on the river:

Do you have any suggestions to do it correctly and displace the river on the terrain?

Thanks in advance, Giulio

Is the topology of your river high enough to allow following the terrain?
Another idea: Haven’t tried the shrinkwrap modifier yet, but if the topology of your river is high enough, maybe using the offset parameter you can lift up the river, such that there are no sections below the terrain anymore. Hope you wouldn’t get to many floating sections then.
Now thinking even further, using that approach you wouldn’t get a riverbed below the water surface. Maybe you don’t need to lift the water level above your terrain, but lower the terrain in those areas to model the riverbed…

Thanks for answering!

Yes, you were right, the topology was the problem!
I tried to make more high the topology of the river with the Remesh Modifier and with just a bit of offset (0.006) most of the river it’s above the surface!!

Yes, your reasoning it’s correct, but the data terrain that I’m using is a DTM (digital terrain model) and represent the altitude of the ground, so my river should stay above it.

Thank’s a lot.
Giulio