Hi,
Which combination of FME transformers would I need to use for splitting an irregular polygon into convex partitions (and possibly also minimizing the number of resulting parts). The following figure illustrates what I am trying to obtain:
I have come up with an approach based on the Triangulator which can be described as follows:
- Sorting all interior lines from the triangulation by decreasing length
- Consider the first occurrence
- Identify the 2 adjacent polygons
- Dissolve those 2 polygons
- Check convexity of result
- If convex, keep result
- If concave, discard result
- The process should for instance escape the loop when all interior lines have been considered
I created an FME workspace which does this.
The initial figure:
would become like this after triangulation:
And ultimately the end result would be the following where all parts are convex:
However the iterations are hard-coded for the moment because the custom transformer I tried to create contains blocking transformers and multiple loops which are not supported. My question is: how would you make the attached FME workspace generic so that it can work with any number of interior edges?
Thank you!
Best regards,
Olivier