Opened 9 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 , 9 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 8 years ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 8 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Looks good, pending a few cosmetic cleanups.
comment:5 by , 8 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
Please bump back to RFC when those cleanups are addressed.
PR here: https://github.com/django/django/pull/6957