question

GaryWheeler avatar image
GaryWheeler asked

What is correct: Lat/Long or Long/Lat?

I'm trying to compare two points on a map using SQL Server. I use geography::Point to create the actual point and do my calculations. However, when I look at MS website I find one case that shows Point being used with Lat/Long and the other with x/y (which is Long/Lat). I seem to match ESRI GIS when I use Lat/Long. But, my question is what is correct?
ms sqllatitude-longitude
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
The X/Y comparison is doing a geometry comparison instead of a geography comparison. If you're using geography, the correct approach is Lat/Long.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

GaryWheeler avatar image GaryWheeler commented ·
This makes sense. I wish MS website was this clear.
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
If you report the specific page to Microsoft, they fix stuff in documentation pretty quick. It's been one of the more responsive areas of the company.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.