Re:Efficient Distance Querying in MySQL
by dandelany on Wednesday November 10, 2021 @09:07PM
(#29183642)
Great post. Just to be pedantic for a moment:
> it gives you results that are 100% correct, which is pretty important!
Not quite 100% correct, as the `ST_Distance_Sphere` function uses a spherical earth model, & in fact the earth is an oblate spheroid :) The slower-but-more-accurate `ST_Distance_Spheroid` also exists if you care about such things.
Re:Efficient Distance Querying in MySQL
by nixpulvis on Wednesday November 10, 2021 @11:19PM
(#29184391)
It's hardly pedantic, the differences can be on the order of kilometers over large distances. The GPS uses WGS 84 as the reference ellipsoid model, for example.
> it gives you results that are 100% correct, which is pretty important!
Not quite 100% correct, as the `ST_Distance_Sphere` function uses a spherical earth model, & in fact the earth is an oblate spheroid :) The slower-but-more-accurate `ST_Distance_Spheroid` also exists if you care about such things.