Geometric Operators
PostgreSQL includes a number of operators to assist in comparing geometric data types included with PostgreSQL.
Some of these operators are implicit Boolean returns (for example, << and >>), and others provide new results from the input elements like math operators (for example, + and -).
Listing
+ | Translation (for example, point '(2,0)' + point '(0,1)') |
- | Translation (for example, point '(2,0)' - point '(0,1)') |
* | Scaling/rotation |
/ | Scaling/rotation |
# | Intersection |
# | Number of points in polygon |
## | Point of closest proximity |
&& | Overlaps |
&< | Overlaps to left |
&> | Overlaps to right |
<-> | Distance between |
<< | Is left of |
<^ | Is below |
>> | Is right of |
>^ | Is above |
?# | Intersects or overlaps |
?- | Is horizontal ... |
Get PostgreSQL Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.