Boost logo

Geometry :

Subject: [ggl] Touching polygons and floating-point
From: Denis Pesotsky (obey)
Date: 2011-02-11 05:20:11


Thanks for answer. But I mean a bit other thing. You noticied same
thing in your blog ("Precision, the cause of spikes").
For example, 1st polygon have coordinates like (1, 1) and (4, 2.3)
(and 1 more coordinate somewhere) and other have coordinates like
(2.1, y1) and (3, y2), where y1 is y coordinate for crosspoint of
Line({1, 1} {4, 2.3}) and y=2.1, while y2 is y coordinate for
cross-point of same line and y=3. In float-point presentation that
points can be not exactly on this line, but very close. Can this
result in leaving 2 separate polygons after union?

2011/2/11 Barend Gehrels <barend_at_[hidden]>:
> Hi Denis,
>
>
> Op 11-2-2011 4:58, Denis Pesotsky schreef:
>>
>> Look at attached picture. There are 2 polygons. Side of first polygon
>> lies on side of second. What GGL will do if I unite them? Will it
>> produce 1 polygon or 2 polygons?
>
> It will produce 1 polygon.
>
>> In other words, does it support fuzzy detection polygons with touching
>> side. When touch side is not vertical or horizontal and they don't
>> have same corners (e.g. they only touch by sides).
>
> Yes, it unites polygons with touching sides. Horizontal or vertical does not
> matter here, and neither does having the same corners. Actually I don't call
> this "fuzzy detection", I mean, they must really touch. If they are just
> close, the two polygons will stay separate.
>
> Regards, Barend
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl
>


Geometry list run by mateusz at loskot.net