[postgis-users] Establish versus of a line
Andrea Peri
aperi2007 at gmail.com
Sun May 2 02:27:25 PDT 2010
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 àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100502/e3949b36/attachment.html>
More information about the postgis-users
mailing list