[geos-devel] Robustness of Binary Predicates
pramsey at refractions.net
Thu Mar 2 23:54:52 EST 2006
I am surprised Martin has not jumped in here with the definitive
answer. It looks like the intersection is being done with a precision
model and the boolean test is not... on graph paper those lines to
not touch, but they do get within the precision tolerance of one
On Mar 2, 2006, at 4:16 AM, Todd Jellett wrote:
> 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
> 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
> 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.
>> geos-devel mailing list
>> geos-devel at geos.refractions.net
> geos-devel mailing list
> geos-devel at geos.refractions.net
More information about the geos-devel