I have a lot of polygons that represent buildings and I want to rasterise them but before I do I need all the polygons to be parallel to the horizon. I need to create a tool that calculates the polygon angles and then use these angles to rotate the buildings accordingly.
Hi
Please, could you send a dataset to test?
Hi,
here I uploaded some buidlings which I want to calculate the dominant angles and use them to rotate the buildings to get them horizontal.
thanks in advance
Hi
which uses the BoundingBoxReplacer to get the angle of the longest side.
Hi @DanAtSafe,
Thank you very much for your support. I will try it and give you a feedback.
Hi DanAtSafe,
I am using FME 2021.2 and it seems that BoundingBoxReplacer does not have Long Side Angle parameter. When I choose Replace with: 2D Oriented Bounding Box, I got only 2 options (see attached).
any suggestions?
Hi
Here’s the work-around if you can’t upgrade:
Hi
Thank you very much.
I have used HorizonAngleCalculator instead of AzimuthCalculator (HAC is upgrad version of AC). However, as you can see in the figure attached only one feature of the center points entered the process and finally, I got rejected.
Hi
Hi
Yes I have changed the ExpressionEvaluator to _angle. Also, I have changed the workspace parameters and I got the results attached.
Hi
I did some changes where I have added a “Sorter” and I “FeatureMerger” and now the script works probably.
here is the result