Name

ST_Equals — Teste si deux géométries comprennent le même ensemble de points

Synopsis

`boolean ST_Equals(`geometry A, geometry B`)`;

Description

Returns `true` if the given geometries are "topologically equal". Use this for a 'better' answer than '='. Topological equality means that the geometries have the same dimension, and their point-sets occupy the same space. This means that the order of vertices may be different in topologically equal geometries. To verify the order of points is consistent use ST_OrderingEquals (it must be noted ST_OrderingEquals is a little more stringent than simply verifying order of points are the same).

In mathematical terms: ST_Equals(A, B) ⇔ A = B

The following relation holds: ST_Equals(A, B) ⇔ ST_Within(A,B) ∧ ST_Within(B,A)

 Amélioration : 3.0.0 a permis la prise en charge de `GEOMETRYCOLLECTION`

Cette méthode implémente la spécification OGC Simple Features Implementation Specification for SQL 1.1.

s2.1.1.2

Cette méthode implémente la spécification SQL/MM.

SQL-MM 3: 5.1.24

Modifié : 2.2.0 Retourne vrai même pour les géométries invalides si elles sont binairement égales

Exemples

```SELECT ST_Equals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
st_equals
-----------
t
(1 row)

SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
st_equals
-----------
t
(1 row)
```