ST_Equals¶
Returns true if geomA equals geomB.
Usage¶
boolean ST_Equals(geomA: geometry, geomB: geometry)
boolean ST_Equals(geogA: geography, geogB: geography)
Arguments¶
- geogA (geography): Input geography
- geogB (geography): Input geography
- geomA (geometry): Input geometry
- geomB (geometry): Input geometry
Description¶
Returns true if the two geometries are topologically equal (i.e., they
represent the same point set, regardless of vertex order).
Examples¶
SELECT ST_Equals(
ST_GeomFromText('LINESTRING(0 0, 1 1)'),
ST_GeomFromText('LINESTRING(1 1, 0 0)')
);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_equals(st_geomfromtext(Utf8("LINESTRING(0 0, 1 1)")),st_geomfromtext(Utf8 │
│ ("LINESTRING(1 1, 0 0)")))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ true │
└──────────────────────────────────────────────────────────────────────────────┘
SELECT ST_Equals(
ST_GeogFromText('LINESTRING(0 0, 1 1)'),
ST_GeogFromText('LINESTRING(1 1, 0 0)')
);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_equals(st_geogfromtext(Utf8("LINESTRING(0 0, 1 1)")),st_geogfromtext(Utf8 │
│ ("LINESTRING(1 1, 0 0)")))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ true │
└──────────────────────────────────────────────────────────────────────────────┘