I have a rather simple model:
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)?
1 Answer 1
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.