[geos-devel] Robustness of Binary Predicates
Todd Jellett
todd.jellett at caris.com
Thu Mar 2 07:16:48 EST 2006
Sorry (again), I should have investigated the crash more closely.
It was not occurring in the touches call but rather because I was trying
to dynamic_cast a Geometry to a GeometryCollection. The first example I
sent returned a collection from the intersection call while the second
(corrected) example correctly returns the intersection as a single
point. I just wasn't checking the result of the cast.
My real problem is that using a FIXED precision model (scale = 1.0 =
Whole Numbers) and the LineStrings:
L1 = LINESTRING (-1.0 -2.0, 9.0 5.0, 0.0 0.0, 13.0 6.0)
L2 = LINESTRING (5.0 5.0, 5.0 3.0)
I get:
L2->touches( L1 ) = false
L2->disjoint( L1 ) = true
but
L2->intersection( L1 ) = POINT(5.0 3.0)
How can there be a non-NULL intersection (a single point) but still have
the 2 geometries *being disjoint and not touching*?
The intersection is correct. I am questioning the correctness of the
Binary Predicates (touches and disjoint) since both should agree.
Sorry for the confusion
Todd
strk at refractions.net wrote:
>On Wed, Mar 01, 2006 at 12:59:54PM -0400, Todd Jellett wrote:
>
>
>>Sorry, the second LineString should be:
>>LINESTRING (5.0 5.0, 5.0 3.0)
>>
>>This one crashes in L2->touches( L1 )
>>
>>
>
>Can you provide an xml test showing the crash ?
>I tried relate(L1,L2) with 2.2.2 and HEAD with
>no crashes.
>
>--strk;
>
>_______________________________________________
>geos-devel mailing list
>geos-devel at geos.refractions.net
>http://geos.refractions.net/mailman/listinfo/geos-devel
>
>
More information about the geos-devel
mailing list