Skip to main content
Solved

Minimum bounding geometry - oriented rectangle

  • June 6, 2022
  • 3 replies
  • 346 views

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​ 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

DanAtSafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 344 replies
  • 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
  • 606 replies
  • 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+36
  • Contributor
  • 2001 replies
  • 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​ 

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.