Pomelo.EntityFrameworkCore.MySql icon indicating copy to clipboard operation
Pomelo.EntityFrameworkCore.MySql copied to clipboard

Revisit and document spatial distance algorithms

Open lauxjpn opened this issue 5 years ago • 0 comments
trafficstars

We should do some performance tests with the current distance calculation implementations in regards to index usage.

We should also decide, whether the current implementation strategy is the way to move forward here, where we dynamically check the SRID and then use ST_Distance or ST_Distance_Sphere, or even "polyfill" implementations when they resort to Cartesian distance calculations instead of spherical ones when an SRID <> 0 is being used.

We should also check, whether a more precise earth radius should be used instead of the faulty one MySQL uses as the default.

We should also decide, how we want to handle SRIDs besides 4326 and 0.

At least we need to document, which version of MySQL/MariaDB uses what algorithm in their distance functions (ST_Distance and ST_Distance_Sphere).


Some references:

lauxjpn avatar Oct 05 '20 16:10 lauxjpn