Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
This function takes in two geospatial objects and determines whether any part of them overlap.
GEOGRAPHY_INTERSECTS ( geo1, geo2 )
If both geo1 and geo2 are points, this function only returns true if they are identical.
Boolean
SELECT id, name FROM neighborhoods
WHERE
GEOGRAPHY_INTERSECTS("POINT(-73.94990499 40.69150746)", shape);
SELECT *
FROM neighborhoods WITH (index = shape, resolution = 16)
WHERE GEOGRAPHY_INTERSECTS(shape,"POLYGON(...)");
The with (index = c, resolution = n)
syntax is an optional optimization discussed in the section Special Spatial Tuning Parameters.