PostGIS

~=

Prev

8.10.1. Bounding Box Operators

Next

Name

~= — Returns TRUE if A’s bounding box is the same as B’s.

Synopsis

+boolean +~=( geometry A , geometry B );

Description

The ~= operator returns TRUE if the bounding box of geometry/geography A is the same as the bounding box of geometry/geography B.

Note

This operand will make use of any indexes that may be available on the geometries.

Availability: 1.5.0 changed behavior

check This function supports Polyhedral surfaces.

Warning

This operator has changed behavior in PostGIS 1.5 from testing for actual geometric equality to only checking for bounding box equality. To complicate things it also depends on if you have done a hard or soft upgrade which behavior your database has. To find out which behavior your database has you can run the query below. To check for true equality use ST_OrderingEquals or ST_Equals.

Examples

select 'LINESTRING(0 0, 1 1)'::geometry ~= 'LINESTRING(0 1, 1 0)'::geometry as equality;
 equality   |
-----------------+
          t    |

See Also

Prev

Up

Next

~(box2df,box2df)

Home

<→