1

I have two polyline which represent the river bank of a particular section of a river drawn based on Satellite imagery at 1984 and 2019. As you can see in the picture, it is drawn in red line with yellow vertices and another is orange line with blue vertices. I want to measure perpendicular length from one polyline's vertices to other polyline i.e yellow vertices perpendicularly on orange polyline and blue vertices perpendicularly on red polyline and resuting length will be added to the attribute table of vertices layer showing the perpendicular line also. How can I proceed to do with QGIS 3.X?Brahmaputra River, Mymensingh, Bangladesh

4

(1) Perpendicular length from Yellow vertices to Orange line

Open the attribute table of the yellow vertices layer (Right Bank Brahmaputra 2019) and create a new field with below expression:

length(shortest_line($geometry, geometry(get_feature_by_id('Right Bank Brahmaputra 1984', 1))))

(I am assuming the orange line has the id: 1 - please adjust it otherwise).

(2) Perpendicular line from Yellow vertices to Orange line

Duplicate the Yellow vertices layer and open the Layers Properties > Symbology and change the line layer type to Geometry generator. The expression is:

shortest_line($geometry, geometry(get_feature_by_id('Right Bank Brahmaputra 1984', 1)))

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.