There are two methods you can use to test whether a geometry is equal to another geometry: ST_Equals, and ST_OrderingEquals. These methods perform the comparison differently, and return a different result.
ST_Equals The order in which points are specified does not matter, and point comparison takes tolerance into account. Geometries are also considered equal if they occupy the same space, within tolerance. This means that if two linestrings occupy the same space, yet one is defined with more points, they are still considered equal.
ST_OrderingEquals With ST_OrderingEquals, the order in which points are specified matters, and point comparisons do not take tolerance into account. That is, points must be exactly the same, including being specified in the exact same order, for the geometries to be considered equal.
To illustrate the difference in results when comparisons are made using ST_Equals versus ST_OrderingEquals, consider the following lines. ST_Equals considers them all equal (assuming line C is within tolerance). However, ST_OrderingEquals does not consider any of them equal.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |