Geographic Information Systems Asked by hadallen on June 27, 2021
I have a model that I have built to automate the process of assessing wind hazard on forested edges.
Currently I can run it successfully but:
degrees(
with_variable(
'line',
shortest_line (
centroid (
array_first(
overlay_nearest(
'Test',
$geometry
)
)
),
$geometry
),
azimuth (
start_point (@line),
end_point (@line)
)
)
)
I have tried the following, but I think I must be misunderstanding something here – I think it should easier than I am making it.
I have been unsuccessful in my attempt of making it a single model with 2 inputs, and 1 output (wind_hazard). I have tried using Wind_Hazard_Prep within the second Assessment model, but that did not work either – I could not reference the Wind_Hazard_Prep output from within the Offset_Azimuth Calc expression.
I see that there is a workaround by using Join Attribute by nearest, but I cannot figure out how to add and calculate the offset_azimuth field with it, as the problem here is that I cannot reference the exploded lines layer and the Intersection_OUTPUT (point layer) at the same time
I likely have this more complicated than it needs to be, but it's working. To get around the geometry type difference (line segments and points), I interpolated midpoints and merged them together, then used field calculator to calculate the offset_azimuth as desired.
Now this model works, take a single boundary layer input and wind direction. Some tweaking as I have already discovered an issue if I use a windDir higher than 315 or lower than 45. Feel free to answer with a more appropriate solution
Correct answer by hadallen on June 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP