#27448: GIS distance queries use deprecated ST_distance_sphere
-------------------------------------+-------------------------------------
Reporter: Christian von | Owner: Mjumbe
Roques | Poe
Type: | Status: assigned
Cleanup/optimization |
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GIS distance | Triage Stage: Accepted
deprecated ST_distance_sphere |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Claude Paroz):
Could you please first fix the test which is still using the deprecated
syntax. That is, move the test in `DistanceFunctionsTests` and replace:
`AustraliaCity.objects.exclude(id=hillsdale.id).distance(hillsdale.point,
spheroid=True)`
by
`AustraliaCity.objects.exclude(id=hillsdale.id).annotate(distance=Distance('point',
hillsdale.point, spheroid=True))`
The fix might mostly (exclusively?) concern
`django/contrib/gis/db/models/functions.py`.
--
Ticket URL: <https://code.djangoproject.com/ticket/27448#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.7fc593c7742f8e5ebbed9eb04915f35a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.