Question

How to split regular polygon with specific area?


Badge

split_polygonHi,

I have a set of regular polygons of 4 vertex like shows attached figure.

I have to split each of these polygons in 2 parts following red line shown in attached figure. Also, I have the condition to cut in parts of specific amount of total polygon area, for example: 20%.

 

It's important to say I don't have the red line. It's only to explain how to cut the polygon.

 

I tried PolygonCutter transformer from FME Hub but needs to have the line, so maybe the question was how to create the cutter line? 

 

I look forward to hearing your expert suggestions, thank you!


2 replies

Badge +2

Hi @gerard​ ,

Are all of your polygons oriented (and needing to be cut) in the same direction? If so, you could use a couple of BoundsExtractors, a Scaler, and an Offsetter. The Scaler really simplifies it because it scales the feature by a percentage of the original size which you then simply need to offset to return to the original position.

Original polygon:

imageCut Polygon:imageIn this example, I only reduced size in the Y direction to make easy to offset to the original position - offset calculated from the bounds of the original min y - new min y. You could clip the original feature with the scaled feature as well if desired. Should work the same in the x orientation by scaling and offsetting in the same direction.

Hope that helps.

Badge

Hi @gerard​ ,

Are all of your polygons oriented (and needing to be cut) in the same direction? If so, you could use a couple of BoundsExtractors, a Scaler, and an Offsetter. The Scaler really simplifies it because it scales the feature by a percentage of the original size which you then simply need to offset to return to the original position.

Original polygon:

imageCut Polygon:imageIn this example, I only reduced size in the Y direction to make easy to offset to the original position - offset calculated from the bounds of the original min y - new min y. You could clip the original feature with the scaled feature as well if desired. Should work the same in the x orientation by scaling and offsetting in the same direction.

Hope that helps.

Thank you very much @chrisatsafe​ for your feedback, I'm going to check your idea right now ...

 

Yes, it's very important to maintain the position and orientation of the rectangles.

These rectangles are footprints of aerial images and the attached figure in my previous message represents a (part of) flight strip. Flight direction determines footprints orientation. In a nutsh, I have to check if some % of area between parallel flight strips are completely recovered by footprints images.

 

Hope I have explained clearly. The main idea is that I have to cut each original polygon maintaining their shape. Thank you @chrisatsafe​ 

Reply