Annotations for "STWithin (geometry Data Type)" topic.Wed, 01 Apr 2015 09:45:04 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