Consider the following SQL:
DECLARE @g1 AS GEOGRAPHY;
DECLARE @g2 AS GEOGRAPHY;
DECLARE @g3 AS GEOGRAPHY;
SET @g1 = GEOGRAPHY::STGeomFromText('POLYGON ((-97.5 33.0, -97.5 34.0, -96.5 34.0, -96.5 33.0, -97.5 33.0))', 4326);
SET @g2 = GEOGRAPHY::STGeomFromText('POINT (-97.5 33.5)', 4326);
SET @g3 = GEOGRAPHY::STGeomFromText('POINT (-98.0 35.0)', 4326);
SELECT @g1.STIntersects(@g2);
SELECT @g1.STIntersects(@g3);
I would expect that the first result would be 1 (true) as the point (@g2) is on the line of the rectangle. However, I would expect that the second result would be 0 (false) as the point (@p3) is nowhere near the region (@p1). However, both results are 1 (true).
I feel as though there is something I am missing fundamentally. If someone can explain, I would greatly appreciate it.