Skip to main content
Solved

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


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.

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

Forum|alt.badge.img+2

@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
Evangelist
Forum|alt.badge.img+42
markatsafe wrote:

@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!


Reply


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