# [geos-devel] How robust is GEOS?

Martin Davis mbdavis at VividSolutions.com
Fri May 6 11:43:51 EDT 2005

```Kevin, List, strk:

I've made an enhancement to JTS (based on a suggestion by Kevin) which
seems to solve the issue of computed intersection points lying outside
the intersection of the segment envelopes.  (This is simply one
different function in RobustLineIntersector - it's an easy patch, strk).

This still doesn't produce the ultimate desired result of computing
intersections to the full 56 bits of double precision, however.  We're
working on a solution for that - will post it if and when it's done.

Martin

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.      www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046

-----Original Message-----
From: geos-devel-bounces at geos.refractions.net
[mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of Kevin
Wiebe
Sent: May 3, 2005 7:00 AM
To: geos-devel at geos.refractions.net
Subject: [geos-devel] How robust is GEOS?

(numerically stable) way to use GEOS?  What are its limitations?

For our purposes we need to use code that is both as fast and
accurate as possible.  As you probably know, when using a complex
algorithm sometimes even small inaccuracies in geometric computations
can compound into drastically incorrect results.

Here is a concrete example from real customer data:

I have created two simple 2-point LINEs and used the GEOS call
to get the spot where they intersect:

point = lineA.intersection(lineB);

lineA = from (2089426.5233462777,1180182.3877339689) to
(2085646.6891757075,1195618.7333999649)

lineB = from (1889281.8148903656,1997547.0560044837) to
(2259977.3672235999,483675.17050843034)

the intersection point I get back is this:

point = (2097408.2633752143,1144595.8008114607)

This point is a significant distance away from any part of
lineA.  If one were to place this intersection point between the start
and end points of lineA, the resulting line would look ridiculous.

JTS returns the same result.

Depending on your explanations for this I may have some

-Kevin-

----------------------------------------------------------------

Kevin Wiebe     Safe Software Inc.              kevin at safe.com

Senior     Surrey, BC, CANADA       phone: (604) 501-9985

Developer     http://www.safe.com        fax: (604) 501-9965

----------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20050506/732343a2/attachment.html
```