[postgis-users] Establish versus of a line
Andrea Peri
aperi2007 at gmail.com
Mon May 3 06:22:18 PDT 2010
I don't be sure use the CCW detection is what I'm need.
Because my lines are surely simple, but not closed.
I need more study on the problem.
2010/5/3 strk <strk at keybit.net>
> You're probably looking for an ST_IsCCW() function
> ( is counter-clock-wise ? ).
>
> Such a function could only work with closed and simple
> lines (see ST_IsClosed and ST_IsSimple).
>
> It's not available at the moment, but defining the interface
> is half work, so shouldn't cost too much to add :)
>
> --strk;
>
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
>
> On Sun, May 02, 2010 at 11:27:25AM +0200, Andrea Peri wrote:
> > Hi,
> >
> > I do some test.
> >
> > I notice that the ST_OrderingEquals
> >
> > return true only when two lines are perfectly identical (same sequence
> > vertex too).
> >
> > For example:
> >
> > Select ST_OrderingEquals(
> > ST_GeomFromText('LINESTRING(2 3, 3 2, 6 1)',3003
> > ),ST_GeomFromText('LINESTRING(2 3, 3 2, 6 1)',3003 )
> > )
> >
> > But if I add a single vertex to one of lines it return false.
> > Select ST_OrderingEquals(
> > ST_GeomFromText('LINESTRING(2 3, 3 2, 6 1, 8 9)',3003
> > ),ST_GeomFromText('LINESTRING(2 3, 3 2, 6 1)',3003 )
> > )
> >
> > So it is not useful to detect the versus of lines because
> > the linestring of the line table is not sure they are perfectly identical
> to
> > the definition of the boundary of polygons.
> > The boundary of polygons are always closed lines.
> > Instead the same closed arc may be require more lines of the line table.
> >
> > More again:
> > even supposing the lines-table elements was closed like the boundary of
> > polygons the ST_OderingEqual require they are
> > first vertex identical.
> >
> > So this case of two lines identical, and same versus but different
> starting
> > vertex, return false.
> >
> > Select ST_OrderingEquals(
> > ST_GeomFromText('LINESTRING(2 3, 3 2, 6 1, 8 9, 2 3)',3003
> > ),ST_GeomFromText('LINESTRING(3 2, 6 1, 8 9, 2 3, 3 2)',3003 )
> > )
> >
> > Regards,
> >
> >
> > --
> > -----------------
> > Andrea Peri
> > . . . . . . . . .
> > qwerty אטלעש
> > -----------------
>
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100503/158cba58/attachment.html>
More information about the postgis-users
mailing list