I am trying to check point in polygon, but STIntersect producing wrong result, below is given both point and polygon.
DECLARE @point GEOGRAPHY = GEOGRAPHY::Point(25.631119, 54.666181, 4326)
DECLARE @polygon GEOGRAPHY = GEOGRAPHY::STGeomFromText('POLYGON
((55.368827104612151 25.270499845366924, 55.368226289792808
25.268578811810126, 55.367410898252288 25.269529630198974,
55.368054628415855 25.270364015710307, 55.368827104612151
25.270499845366924))', 4326)
SELECT @polygon.STIntersects(@point), @point.STIntersects(@polygon)
Result is returning 1, however it should return 0, because i pick the point out side of fence,,
Am I making anything wrong with polygon coordinates? Please advice me for any stupid mistake of mine as I am new in spatial data types.