Opened 9 years ago
Last modified 9 years ago
#25446 new New feature
Can't use PostGIS function ST_OrderingEquals with GeoDjango — at Version 1
Reported by: | Evan Heidtmann | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Unless I'm missing something, Django 1.8 provides no facility in the ORM to use the ST_OrderingEquals() function to compare two geometries. I would like to use this function in a query.
Am I correct? If so, I may attempt a patch or at least a workaround.
Thanks!
Ref: http://postgis.net/docs/manual-1.3/ch06.html#ST_OrderingEquals
P.S. It's another question entirely whether the 'exact' lookup should use this function. For comparison, two LineString objects with opposite vertex ordering are not considered equal, so why should they be considered equal at the DB level?
For other users who may find this, here's my workaround that allows me to find the geometry that matches an input geometry, both in vertex values and in vertex ordering. A Django wizard may be able to improve this and I would welcome any criticism.