If you have a layer for the water body, you can use QGIS expressions with Geometry by expression to generate the lines by 1) creating the buffer, 2) taking only the boundary of the buffer, 3) retain only that part of the buffer-boundary that intersects with the water.
Use this expression and replace the value in line 2 (here: 3000
) by the size of your buffer and water
with the name of your waterbody-layer. The resulting layer will have all the attributes from the cliff-layer that you use as input:
intersection(
boundary (buffer ($geometry, 3000)),
collect_geometries(aggregate( 'water', 'collect',$geometry)))
Screenshot: cliffs (yellow) and waterbody (light blue) as well as dark blue lines, created with the expression from above (here with Geometry Generator for demonstration purpose, but you should use Geoemtry by expression as explained above. As you can see from the labels, the lines have the same attributes/values as the cliff:
Edit
If you have several neighboring cliffs, the buffer and it's boundaries will overlap. To keep only the non-overlapping part and separate line-features, use this expression, based on the one above, but then clips the result: the lines that overlap a buffer around the cliff (slightly smaller than the initial buffer) are deleted. Set the buffer-size in the sencod last line (here: 99.9
) to a value slightly smaller then the size in line 4 (here: 100
):
difference(
intersection (
boundary (
buffer ($geometry,100)
),
collect_geometries(
aggregate(
'water',
'collect',
$geometry
))),
buffer (
collect_geometries (
aggregate (
'cliffs',
'collect',
buffer ($geometry, 0)
)),
99.9
))