1

I have a rather simple model:

enter image description here

I have one vector line and one distance as input and I want to "draw" a line on the from the centroid of the line with the "distance" on each side. But I don't understand why I can't use the field calculator as input for the bearing any suggestion what I'm missing (The Using Algorithm Output is empty for the Bearing)?

enter image description here

enter image description here

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 25, 2022 at 19:48

1 Answer 1

0

In the end I made a different model solving the issue with Geometry by expression, I transformed the geometry twice which may have been unnecessary but this is how the final model looked like: Final model

The expression that solved the issue was: make_line( project( centroid( $geometry ), @width/2 , azimuth(start_point(transform($geometry,'EPSG:32632', 'EPSG:4326')), end_point(transform($geometry,'EPSG:32632', 'EPSG:4326'))) -radians(90)), project( centroid( $geometry ), @width/2, azimuth(start_point(transform($geometry,'EPSG:32632', 'EPSG:4326')), end_point(transform($geometry,'EPSG:32632', 'EPSG:4326'))) +radians(90)) )

It would probably been easier if I just translated the centroid and projected point than it only would have required one algorithm, anyhow this was at least a working solution.

answered Oct 26, 2022 at 13:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.