[geos-devel] GEOS robustness question

Kevin Wiebe Kevin.Wiebe at safe.com
Mon Jun 23 19:08:36 EDT 2003

> Paul is right, in that the crosses() predicate reports 
> whether two lines strings properly cross or not.
> In fact, all the named predicates are implemented in terms 
> of the basic relate() method, which evaluates them all in 
> the same way.  You will find that the implementation is 
> fully robust, by virtue of using a robust line segment 
> intersection test and carefully coding to evaluate all 
> possible ways geometrys can interact.  This is documented 
> in the JTS materials.
> Martin Davis, Senior Technical Architect
> Vivid Solutions Inc.
> Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
> Phone: (250) 385 6040    Fax: (250) 385 6046
> EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com

Martin, your answer has taught me to ask a more intelligent question.

It appears obvious that the upper level calls on Geometry objects do not have a direct correspondence to underlying "core" algorithms.  I guess what I am looking for is some part of the core code, probably in the "algorithm" directory, where the lowest level computations are being done.

I may have to study many complex structures to understand how things are done, but I'm prepared.  I hope.

I think the previous "lines crossing" question was a bit too vague.  I'm not trying to hunt down a single algorithm; I am just looking for the core algorithms that do this "type" of thing.

Instead, maybe I can ask for the sections of code that would distinguish between a line that "meets" a polygon (stays outside, but touches the border) and a line that "cuts through" a polygon (part of the line inside, and part outside).  For argument's sake, let's say all the vertices on the line are outside the polygon.

Pointers to a file, a method, a line of code :), or a general walk through how this decision is done, internally, would be helpful.


 Kevin Wiebe     Safe Software Inc.       email:kevinAtsafe.com
      Senior     Surrey, BC, CANADA       phone: (604) 501-9985
   Developer     http://www.safe.com        fax: (604) 501-9965

More information about the geos-devel mailing list