Solved

Minimum bounding geometry - oriented rectangle


Badge +1

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).

icon

Best answer by DanAtSafe 6 June 2022, 20:44

View original

3 replies

Userlevel 1
Badge +11

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​ 

Badge +2

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:

imageIf 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.

imageI've attached the workspace in case that helps.

Badge +22

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.

Reply