Annotations for "STWithin (geometry Data Type)" topic.Sun, 23 Apr 2017 23:44:20 Z
http://msdn.microsoft.com/en-us/library/bb933991(v=sql.110).aspx#CommunityContent
S. JordanBoundary is not included when using STWithin()The boundary of a polygon is not contained within a polygon, however it does touch the boundary and an intersection does exist.Declare @point 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 @point .STWithin(@polygon) as [STWithin], @point .STTouches(@polygon) as [STTouches], @point .STIntersects(@polygon) as [STIntersects], @point .STIntersection(@polyMon, 04 Mar 2013 19:22:35 -0800