[Django] #27574: support geodetic distance calculation on MySQL 5.7+

29 views
Skip to first unread message

Django

unread,
Dec 5, 2016, 1:05:05 PM12/5/16
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
-------------------------------------------+------------------------
Reporter: Sergey Fedoseev | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
[https://dev.mysql.com/doc/refman/5.7/en/spatial-convenience-
functions.html#function_st-distance-sphere ST_Distance_Sphere] function
that returns geodetic distance was added in MySQL 5.7.6.

--
Ticket URL: <https://code.djangoproject.com/ticket/27574>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 5, 2016, 1:05:17 PM12/5/16
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
| Fedoseev
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sergey Fedoseev):

* status: new => assigned
* owner: nobody => Sergey Fedoseev


--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:1>

Django

unread,
Dec 6, 2016, 9:01:06 AM12/6/16
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
| Fedoseev
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:2>

Django

unread,
Dec 8, 2020, 9:34:05 AM12/8/20
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
| Fedoseev
Type: New feature | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tobias Krönke):

I would like to note, that `ST_Area` also works, although Django denies
its execution:

{{{
Region.objects.order_by(RawSQL('ST_Area(polygon)', params=[]))
<QuerySet [<Region: Region object (1)>, '...(remaining elements
truncated)...']>
}}}

in contrast that errors with contributed `Area`:

{{{
from django.contrib.gis.db.models.functions import Area
Region.objects.order_by(Area('polygon'))
...
django.db.utils.NotSupportedError: Area on geodetic coordinate systems not
supported.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:3>

Django

unread,
Dec 8, 2020, 2:36:18 PM12/8/20
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
---------------------------------+------------------------------------
Reporter: Sergey Fedoseev | Owner: (none)

Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Sergey Fedoseev => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:4>

Django

unread,
Mar 4, 2021, 12:15:11 PM3/4/21
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
---------------------------------+------------------------------------
Reporter: Sergey Fedoseev | Owner: tokibito

Type: New feature | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by tokibito):

* owner: (none) => tokibito


* status: new => assigned


Comment:

I created the patch [https://github.com/django/django/pull/14080 PR].

Updated the Distance function and be able to use distance lookup on MySQL.

--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:5>

Django

unread,
Mar 4, 2021, 12:50:37 PM3/4/21
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
---------------------------------+------------------------------------
Reporter: Sergey Fedoseev | Owner: tokibito
Type: New feature | Status: assigned
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

Please uncheck "patch needs improvement" after addressing the test
failures and other review comments. If the tests are passing locally,
perhaps it's a difference between the versions that [wiki:Jenkins] uses.

--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:6>

Django

unread,
Dec 31, 2021, 4:52:50 AM12/31/21
to django-...@googlegroups.com
#27574: support geodetic distance calculation on MySQL 5.7+
---------------------------------+------------------------------------
Reporter: Sergey Fedoseev | Owner: (none)

Type: New feature | Status: new
Component: GIS | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: tokibito => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27574#comment:7>

Reply all
Reply to author
Forward
0 new messages