[geos-devel] Issues with relate not handling GeometryCollections?

Martin Davis mbdavis at VividSolutions.com
Fri Dec 6 16:48:55 EST 2002


Good one...    Not sure if this would be a harder problem or not - I think it all depends on the approach.  The green line would almost certainly end up being clipped (or noded - same thing), which would move it slightly.  However, the red line would probably be noded in the same way.  If the red line was identical to the green line, the node point would be the same, so you would get the right answer.  If it was different - well, it probably wouldn't overlay the green line exactly then anyway.  I guess one obvious failure case is where the red line IS different, but the (rounded) node created causes it to become identical to the green line.

I think it would be possible to develop an imprecise version of relate, which simply calculated approximate intersection points and proceeded as if they were correct.  This code would be robust (it would never fail) but might produce incorrect answers (semantical note: can code be called robust it it's incorrect?).    The question is, what would be the percentage of incorrect answers?  And how would you test them, anyway?

Martin Davis, Senior Technical Specialist
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


> -----Original Message-----
> From: David Blasby [mailto:dblasby at refractions.net]
> Sent: Friday, December 06, 2002 1:26 PM
> To: GEOS Development List
> Subject: Re: [geos-devel] Issues with relate not handling
> GeometryCollections?
> 
> 
> Here's another nasty.  Its basically the same as martin's 
> 2-triangle problem, but its a triangle-and-line collection 
> (green) versus a line (red).
> 
> Its more difficult because the union of a polygon and a line 
> is (often) the polygon and the line (with the line being clipped).
> 
> dave
> 
> 



More information about the geos-devel mailing list