Opened 8 years ago

Closed 8 years ago

#26685 closed New feature (fixed)

Implement Spatialite PtDistWithin() in GeoDjango

Reported by: deed02392 Owned by: Kevan Swanberg
Component: GIS Version: 1.9
Severity: Normal Keywords: spatialite dwithin
Cc: kevswanberg@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

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>

Change History (6)

comment:1 by Tim Graham, 8 years ago

Easy pickings: unset
Triage Stage: UnreviewedAccepted

comment:2 by Kevan Swanberg, 8 years ago

Cc: kevswanberg@… added
Has patch: set
Owner: changed from nobody to Kevan Swanberg
Status: newassigned
Version 0, edited 8 years ago by Kevan Swanberg (next)

comment:3 by Tim Graham, 8 years ago

Patch needs improvement: set

Comments for improvement are on the PR.

comment:4 by Tim Graham, 8 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Looks good, pending a few cosmetic cleanups.

comment:5 by Tim Graham, 8 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Please bump back to RFC when those cleanups are addressed.

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 35504f74:

Fixed #26685 -- Added dwithin lookup support on SpatiaLite.

Note: See TracTickets for help on using tickets.
Back to Top