I have two areas which you can see on the follow picture
2.5 , 4 / 2.5 , 1 / 2 , 1 / 2 , 4 / 0,4 / 0,0 / 7,0 / 7,5 / 2,5 / 2 , 4
2, 5 / 0 , 5 / 0 , 4 / 2, 4
i expect as solution the outside area
0,0 7,0 7,4 0 ,4
and the obstacle inside
but the output polygon vector has only the size 1
0,4 / 0,0 / 7,0 /7,5 /0,5
but i dont understand why ...
is the problem the touch point(2,4) on polygon blue?
Nope, the problem is somewhere in your code. I don't see your code
so I cannot see what it is, but probably your polygon-definitions
(CCW/CCW, Open/Closed) do not correspond to the input you specify.
You can always call "correct".
Another option is (remembering your previous mail about
REGISTER_RING) that you consider a ring as a polygon. That is not
the case. The ring is a simple geometry without any holes. You can
output a union to a ring, but any hole is than (by design)
discarded. A ring cannot have holes, by definition.
> you are right
> I registered my type only as Ring not as polygon.
> It is possible to set my own polygon with my ring type? For environment ccw
> directed and for obstacles cw?
> Is there an easy way to register my rings as polygon?
> I only want to know if the union polygon gets a hole or not
Why then not use boost::geometry::model::polygon, as output.
Another option ( trick) is doing an intersection too. If p and q are areas of input rings, and i and u are areas of intersection and union, u = p + q - i. If that does not hold, the union must have a hole.