Hi,
I think, I'm near to succeed into split Hole easily and quickly, I've made a ltlle tool (not yet terminated) to do it. through the Flugwerk's post on "Hole" I tried to reproduice the principles... and the result are not so bad.
here is a screenshot of an example polygon with Hole... before and after...
Before:
After:
And here is a screenshot of the same work that I told you at start of this post, as you can see there is no more visible bug.
And the result I've got before:
Ready to give you my binary/Source Arno although it is probably not very understandable (cause disorganized).
The principles:
- import .shp file
-> For each Features:
- Order in one object Envelope (first Polygon as usual) and a List of Holes
- Sort Holes from up to down (Ymax) cause the connection start from top of Hole in my algorythm (to avoid disturbing connections to the outside envelope).
-> for each Hole:
- Get the top left point of first Hole and set it as Hole_startIn_point ("vert1" the first vertical will cross by this point)
- caculate the Hole_Out_point by calculate intersect with a vertical "vert2" shifted lightly (I use 0.000001) from Hole_startin_point.
- caculate intersect with outside enveloppe (keep only intersect over and nearest of Hole Top) Env_StartIn_point cross the "vert2" and Env_Out_point cross the vertical wich pass by Hole_startIn_point "vert1".
- replace the envelope polygon by a new simple polygon created with all points in right order:
* Env_StartIn_point
* all other point of envelope (caculate index to start near the point)
* Hole_startIn_point
* All other point af Hole (caculate index to start near the point)
* Hole_Out_point
* Env_Out_point
-> and proceed with next Hole etc....
->and proceed with newt features