[MDEV-13467] Feature request: Support for ST_Distance_Sphere() Created: 2017-08-08 Updated: 2021-07-17 Resolved: 2021-03-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | GIS |
| Fix Version/s: | 10.2.38, 10.3.29, 10.4.19, 10.5.10 |
| Type: | Task | Priority: | Major |
| Reporter: | Travis van der Font | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 29 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Spatial Convenience Function: This function does not exist in any version of MariaDB but does on MySQL 5.7+ and is critical for spatial conversions. ST_Distance_Sphere makes use for calculating the distance of coordinates from points. For more information reference MySQL's documentation directly at: Source Code Reference (thanks to Daniel Black for the commit number): |
| Comments |
| Comment by Dusan Dzurdzic [ 2017-10-17 ] | ||
|
Hi, Are there any news on implementing this feature? Thanks | ||
| Comment by Aurélien LEQUOY [ 2018-01-29 ] | ||
|
I am waiting for this one too ! | ||
| Comment by Ondra Kudlík [ 2018-01-29 ] | ||
|
Is it possible to give some broad ETA like weeks, months, years? For one of our project this is show stopper. We need to decide next step and without at least idea about "when" we would have to switch back to MySQL Thanks | ||
| Comment by Aurélien LEQUOY [ 2018-01-29 ] | ||
|
about ST_Distance_Sphere, we can add function witch do this but without index | ||
| Comment by Daniel Black [ 2018-02-01 ] | ||
|
lots of voters and watchers. Anyone want to get their hands dirty with C/C++ and merge MySQL's implementation into MariaDB? There are a few differences so its a little more than a quick cherr-pic. Commit 60e7f702ac3929c0e38afa7e6dd75fcd5a54c6a9 and others from MySQL. | ||
| Comment by Tom Lahey [ 2018-04-12 ] | ||
|
Another request for an update on this feature. We rely heavily on this feature. Currently running two DB's to support it MySql for spacial, MariaDB for everything else which is a pain. May need to switch to all MySql if this feature is not included soon. | ||
| Comment by Bernd Helm [ 2018-09-05 ] | ||
|
Required this feature for a project and switching now to mysql 8.0 only because of this. Please fix. | ||
| Comment by Steve [ 2019-06-04 ] | ||
|
Another vote from me. Been waiting on these functions for awhile now only to find this one in particular isn't offered. If I had known before starting the project I would have went with mysql purely based on this as we have some ideas in mind which need better spatial support to do them. | ||
| Comment by Andreas Schnederle-Wagner [ 2019-08-01 ] | ||
|
Would be badly needed ... were already forced to switch some Customer VMs to MySQL because of this missing Feature ... :-/ | ||
| Comment by Kyle McNally [ 2019-09-27 ] | ||
|
Would love if this got added soon. Having to hack around and use ST_CONTAINS is annoying | ||
| Comment by Andreas Schnederle-Wagner [ 2020-04-22 ] | ||
|
Issue almost 3 years old and still nothing? Isn't there anyone capable of implementing this Feature? | ||
| Comment by Juan Poma Chavez [ 2020-04-23 ] | ||
|
Here is an equivalent of the function in MariaDB: https://stackoverflow.com/a/56669074/4458956 | ||
| Comment by Robin Dupret [ 2020-11-03 ] | ||
|
@Anel Husakovic : Hello, I took the liberty to work on this feature a few days ago as there was nobody assigned to it. Is this something you are actively working on or just assigning it to yourself for the future ? Maybe I can share what I already have if it can be helpful. | ||
| Comment by Anel Husakovic [ 2020-11-03 ] | ||
|
Hi robin850 yes I have done some patch 55c0b1c99ccfcc41caa, you can take a look. | ||
| Comment by Robin Dupret [ 2020-11-03 ] | ||
|
@anel: Oh, the good news is, I wouldn't have been able to write such patch. I took the liberty to leave some comments in your commit on GitHub. But, IIUC, currently there are two differences with the MySQL implementation:
| ||
| Comment by Anel Husakovic [ 2020-11-03 ] | ||
|
robin850 great thanks will take a look into your comments after review process. | ||
| Comment by Anel Husakovic [ 2020-12-09 ] | ||
|
danblack and robin850 thanks for the review of the previous patch-55c0b1c99.
Thanks | ||
| Comment by Mike McCutcheon [ 2021-02-12 ] | ||
|
Hello. | ||
| Comment by Bernd Helm [ 2021-03-22 ] | ||
|
This feature is critical for all projects that work with lon/lat gps coordinates. The most basic usecase is to find rows in a database table that are close to a users location like other users nearby, the nearest store, the nearest gas station and so on. As soon as a requirement like this pops up, we have to migrate everything to mysql 8.0 which is sad. I hope the stale status does not mean that it will take some more years for this feature to become merged. | ||
| Comment by Anel Husakovic [ 2021-03-22 ] | ||
|
Hi mikemcc, bhelm , | ||
| Comment by Bernd Helm [ 2021-03-22 ] | ||
|
Glad to hear! Thank you for your Work to make this happen! | ||
| Comment by Mike McCutcheon [ 2021-03-22 ] | ||
|
� | ||
| Comment by Anel Husakovic [ 2021-03-27 ] | ||
|
Pushed with 6769d1a0782f140dcd12c to 10.2 after passing protected branch. | ||
| Comment by Robin Dupret [ 2021-03-28 ] | ||
|
Thank you very much for working on this Anel ; really glad to see that feature in MariaDB, great addition. | ||
| Comment by Yi Yang [ 2021-05-16 ] | ||
|
I believe this might be causing a regression of I have a CI running some ST_WITHIN() based address lookup, something like
was working fine in 10.4.18, but is not working in 10.4.19, returning empty result (the point is within the polygon). In 10.4.19 you have to use something like
or drop the index, to get the correct result. Can someone reopen the old issue or create a new issue and fix it? |