[Django] #26685: Implement Spatialite PtDistWithin() in GeoDjango

29 views
Skip to first unread message

Django

unread,
May 30, 2016, 12:33:14 PM5/30/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-----------------------------+--------------------------------
Reporter: deed02392 | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Keywords: spatialite dwithin
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------+--------------------------------
Spatialite has support for determining records which are within a
specified distance of a specified point, in a geometry field, even with a
geodetic coordinate system. This support is implemented using the
PtDistWithin() function. To the contrary, GIS reports an error when
attempting to perform this kind of lookup
(https://github.com/django/django/blob/master/django/contrib/gis/db/backends/spatialite/operations.py#L162).

So GeoDjango does not implement it, instead requiring the user to use
distance in degrees in these situations. Furthermore, the GeoDjango
documentation states that Spatialite does not support 'dwithin', but that
is simply because this function has not been mapped by the GIS project.
https://docs.djangoproject.com/en/1.9/ref/contrib/gis/geoquerysets/#std
:fieldlookup-dwithin

Signed-off-by: George Hafiz <george-hafiz.uk>

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

Django

unread,
May 30, 2016, 2:08:14 PM5/30/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
------------------------------------+------------------------------------

Reporter: deed02392 | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: spatialite dwithin | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* easy: 1 => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Jul 21, 2016, 5:15:40 PM7/21/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-------------------------------------+-------------------------------------
Reporter: deed02392 | Owner:
| kevswanberg
Type: New feature | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: spatialite dwithin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by kevswanberg):

* status: new => assigned
* owner: nobody => kevswanberg
* has_patch: 0 => 1
* cc: kevswanberg@… (added)


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

Django

unread,
Jul 22, 2016, 9:30:49 AM7/22/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-------------------------------------+-------------------------------------
Reporter: deed02392 | Owner:
| kevswanberg
Type: New feature | Status: assigned
Component: GIS | Version: 1.9

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

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

* needs_better_patch: 0 => 1


Comment:

Comments for improvement are on the PR.

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

Django

unread,
Jul 28, 2016, 12:47:34 PM7/28/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-------------------------------------+-------------------------------------
Reporter: deed02392 | Owner:
| kevswanberg
Type: New feature | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: spatialite dwithin | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

Looks good, pending a few cosmetic cleanups.

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

Django

unread,
Aug 8, 2016, 1:08:04 PM8/8/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-------------------------------------+-------------------------------------
Reporter: deed02392 | Owner:
| kevswanberg
Type: New feature | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: spatialite dwithin | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

Please bump back to RFC when those cleanups are addressed.

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

Django

unread,
Aug 30, 2016, 8:46:12 PM8/30/16
to django-...@googlegroups.com
#26685: Implement Spatialite PtDistWithin() in GeoDjango
-------------------------------------+-------------------------------------
Reporter: deed02392 | Owner:
| kevswanberg
Type: New feature | Status: closed
Component: GIS | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: spatialite dwithin | 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 <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"35504f74a8c3b45d308969a77488d11443ce4348" 35504f74]:
{{{
#!CommitTicketReference repository=""
revision="35504f74a8c3b45d308969a77488d11443ce4348"
Fixed #26685 -- Added dwithin lookup support on SpatiaLite.
}}}

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

Reply all
Reply to author
Forward
0 new messages