[postgis-users] Problem with overlay

Martin Davis mbdavis at refractions.net
Tue Jul 3 17:06:51 PDT 2007

Can you post the WKT of two linestrings which you think should overlap?

Overlaps has a very narrow definition. For Linestrings, two linestrings 
overlap if and only if their intersection is itself a linestring (i.e. 
they overlap in a point-set of dimension 1).

I suspect you may be seeing the result of the inevitable coordinate 
drift caused by computing a new coordinate along a line segment. In 
almost all cases, doing this results in two new line segments which are 
NOT coincident with the original.

Jonathan Aguero wrote:
> Rhys,
> That’s the point, they should /overlap/ since they were created from 
> the same linear reference system and the road segment ‘/contains/’ the 
> curve.
> I also tried with /intersects/ but the problem is that it picks up 
> more segments than I need. For example if a curve ends at the same 
> point than a road segment; theoretically, the overlaps should pick up 
> only that segment while /intersects/ pick also the following segment 
> that starts when the previous segment ends. Think also in a situation 
> where a road intersection is located in a curve: /intersects /will 
> select the other segments that converge in the intersection even 
> though they have no curves.
> Now, I might be misinterpreting what the overlap should do; if this is 
> the case please let me know.
> Thanks.

Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

More information about the postgis-users mailing list