I have a list of points (with latitude and longitude) in an SQL Server database, and for each of these points I have to generate a 50 x 50 degrees square (the point being the South West angle of the square).
For instance, if I have the point
0,0 I create the polygon with the following SQL query:
SELECT geography::STPolyFromText('POLYGON((0 0, 50 0, 50 50, 0 50, 0 0))', 4326)
I expected that any point with a latitude greater than 50 would not be part of the polygon generated above. But if I check if the point
25,52 is within the polygon, the query returns
SELECT geography::STPolyFromText('POLYGON((0 0, 50 0, 50 50, 0 50, 0 0))', 4326).STIntersects(geography::STPointFromText('POINT(25 52)', 4326)) -> true
The reason is because when I display the polygon, the shape is rounded at the top:
In this case, how can I generate a geographic polygon where the upper edge is straight and follow the 50th parallel? Should I use another projection?
Also Geometry data type is not an option for this project, I need to stick to Geography.