The boundary of a polygon is not contained within a polygon, however it does touch the boundary and an intersection does exist.Declare @p geometry = geometry::STGeomFromText('Point(1 1)',4326);Declare @polygon geometry = geometry::STGeomFromText('Polygon((1 1, 1 0, 0 0, 0 1, 1 1))',4326);Select @polygon .STContains(@p) as [STContains], @polygon .STTouches(@p) as [STTouches], @polygon .STIntersects(@p) as [STIntersects], @polygon .STIntersection(@p).STAsText()
↧