[geos-devel] [ANN] Bug #87 - Strange result of isValid() for
LinearRing
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Apr 4 19:32:46 EDT 2006
Mateusz Łoskot wrote:
> Hi,
>
> I've reported new bug on the BT:
>
> http://postgis.refractions.net/bugs/bug.php?op=show&bugid=87&pos=4
>
> I think it may need some wider discussion.
>
> Cheers
Hey Mateusz,
I think your test case is bad.
/ 2. Add 4 points to get closed ring
pseq->add(Coordinate(0, 0, 0));
pseq->add(Coordinate(5, 5, 5));
pseq->add(Coordinate(10, 10, 10));
pseq->add(Coordinate(0, 0, 0)); // <--- [1]
The points (0,0,0), (5,5,5), (10,10,10) are all in a straight line (ie:
they are co-linear) and then you return to the start point which falls
on top of the first two segments so you have a case of a collapsed ring
where all the point of the ring fall on a single line in space.
This is indeed self intersecting. and isValid() should report it as false.
-Steve
More information about the geos-devel
mailing list