Skip to main content
Solved

How can I get the straight (and predominant) line from a polygon?

  • October 14, 2022
  • 2 replies
  • 43 views

input_outputI would like to get the predominant line for each polygon. I have tried using the 'CenterlineReplacer' but that doesn't work well since a lot of these shapes aren't long and narrow areas.

 

I only need one line per polygon, but it needs to be straight. The length of the line doesn't matter. I'm interested in the direction.

 

Does anyone have an idea about how I can approach this task?

 

Best answer by markatsafe

@nibon​ BoundingBoxReplacer has a 2D Oriented Bounding Box that might give you the result you need, depending on the nature of your areas. You can then pickout the centerline of the bounding box.

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.

2 replies

Forum|alt.badge.img+2
  • 1891 replies
  • Best Answer
  • October 14, 2022

@nibon​ BoundingBoxReplacer has a 2D Oriented Bounding Box that might give you the result you need, depending on the nature of your areas. You can then pickout the centerline of the bounding box.


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • 2076 replies
  • October 14, 2022

@nibon​ BoundingBoxReplacer has a 2D Oriented Bounding Box that might give you the result you need, depending on the nature of your areas. You can then pickout the centerline of the bounding box.

great solution!