Skip to main content
Solved

Minimum bounding geometry - oriented rectangle


albinepro
Supporter
Forum|alt.badge.img+7

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

Best answer by DanAtSafe

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​ 

View original
Did this help you find an answer to your question?

3 replies

DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • Best Answer
  • June 6, 2022

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​ 


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • June 6, 2022

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.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • June 6, 2022
DanAtSafe wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings