I'm looking for the FME transformator equivalent to QGIS Minimum Bounding Geometry in order to extract the orientation (azimuth) of the feature shape. This topic is not relevant as it refers only to hull because the concern is about the angle of bounding rectangle, i.e. main direction of the geometry (polygon).
Hi @albinepro In FME 2022.1, it's now possible to set an attribute for "Long Side Angle" in the BoundingBoxReplacer if the feature is replaced with a "2D Oriented Bounding Box".
cc @jdh
Hi @albinepro ,
As Dan mentioned, this is streamlined in 2022.1 but if you need to use 2022.0 or older you still have options. Looking at the doc, there are a few outputs so I've created a feature for each. This uses few different transformers to generate the hull, bounding box (and oriented), as well as the minimum circle:
- BoundingBoxReplacer 1) default 2D bounding box 2) 2D oriented bounding box
- MinimumSpanningCircleReplacer
- HullAccumulator
If you are wanting to calculate the azimuth the best way (IMO) would be to use the oriented bounding box feature to determine this. I was able to do so by replacing the oriented bounding box with a CenterlineReplacer and connecting that to the HorizontalAngleCalculator.
I've attached the workspace in case that helps.
Hi @albinepro In FME 2022.1, it's now possible to set an attribute for "Long Side Angle" in the BoundingBoxReplacer if the feature is replaced with a "2D Oriented Bounding Box".
cc @jdh
That's great, I have a fair number of workspaces that calculated the angle based on the positions of the vertices, but this will be much simpler.