geography.STIntersects
spatial predicate STIntersects
What changes
- Input
- one or two spatial instances
- Output or change
- bit
- Return type
- SQL Server return type: bit CLR return type: SqlBoolean
Syntax at a glance
.STIntersects ( other_geography )
Work example
Use geography.STIntersects to test whether two shapes share at least one point.
Check matching SRIDs and consider a spatial index for supported table predicates. Confirm both values use the same SRID before comparing or combining them.
Check your work The result is nullable bit, so test explicitly for 1. Incompatible SRIDs can make a two-instance result null. For this geography result, verify the instance SRID before interpreting its coordinates.
Practice SQL
Open in SQL FlowSELECT geography::Point(0.01, 0.02, 4326).STIntersects(geography::Point(0.02, 0.03, 4326)) AS intersects;
Open Microsoft Learn for full syntax, permissions, and details for your version.