What is the correct order when setting a POINT in MySQL?
Even the answers in SO questions differ on this:
Moving lat/lon text columns into a ‘point’ type column
Is it
POINT(lat lon)
or
POINT(lon lat)
As far, as i see it, it should be the first version (lat lon) as the POINT takes as params x and y, but i was not able to find an definite evidence.
as one can see here https://stackoverflow.com/a/5757054/1393681
the order is (lon lat).
lon is basicly the y axis and lat the x if i look at my globe, but the lon’s are traveling along the x axis and the lat’s along the y axis so i think thats the reason why you use (lon lat)Despite that, if you stay consistent in your application it shoudn’t matter if the world is flipped inside your db 😉