ST_INTERSECTS function determines whether two input GEOGRAPHY objects intersect each other.
If either input is empty, ST_INTERSECTS will return FALSE.
Before performing the intersection check, the two inputs are aligned through a snapping process, ensuring precise calculation. For more details on snapping, refer to the snapping documentation.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<geo1> | The first GEOGRAPHY object to check for intersection with the second object. | GEOGRAPHY |
<geo2> | The second GEOGRAPHY object to check for intersection with the first object. | GEOGRAPHY |
Return Type
ST_INTERSECTS returns a value of type BOOLEAN.
Example
The following code example constructs two LineStrings near Times Square in New York City from their WKT representations asGEOGRAPHY objects and determines if the LineStrings intersect:
| result (BOOLEAN) |
|---|
| t |