diff options
author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2018-06-22 14:13:49 +0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-06-22 10:18:27 -0400 |
commit | c1c1ac20444c25345bb2cb692c7bd8fa09afd250 (patch) | |
tree | d3bfe8b36e621522847ed82cd6054f5c6fab9abb | |
parent | 714612a638ff02f02406553a583b2f8a1a424885 (diff) | |
download | django-c1c1ac20444c25345bb2cb692c7bd8fa09afd250.tar.gz |
[2.1.x] Added description, example, and SQL equivalents for equals and same_as GIS lookups.
Backport of 9af83a62e7639567afde8b76ce70e7982873e4c5 from master
-rw-r--r-- | docs/ref/contrib/gis/geoquerysets.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index dfc86c4efb..7a0a75062c 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -269,6 +269,21 @@ SpatiaLite ``Disjoint(poly, geom)`` *Availability*: `PostGIS <https://postgis.net/docs/ST_Equals.html>`__, Oracle, MySQL, SpatiaLite, PGRaster (Conversion) +Tests if the geometry field is spatially equal to the lookup geometry. + +Example:: + + Zipcode.objects.filter(poly__equals=geom) + +========== ================================================= +Backend SQL Equivalent +========== ================================================= +PostGIS ``ST_Equals(poly, geom)`` +Oracle ``SDO_EQUAL(poly, geom)`` +MySQL ``MBREquals(poly, geom)`` +SpatiaLite ``Equals(poly, geom)`` +========== ================================================= + .. fieldlookup:: exact .. fieldlookup:: same_as @@ -278,6 +293,23 @@ Oracle, MySQL, SpatiaLite, PGRaster (Conversion) *Availability*: `PostGIS <https://postgis.net/docs/ST_Geometry_Same.html>`__, Oracle, MySQL, SpatiaLite, PGRaster (Bilateral) +Tests if the geometry field is "equal" to the lookup geometry. On Oracle and +SpatiaLite it tests spatial equality, while on MySQL and PostGIS it tests +equality of bounding boxes. + +Example:: + + Zipcode.objects.filter(poly=geom) + +========== ================================================= +Backend SQL Equivalent +========== ================================================= +PostGIS ``poly ~= geom`` +Oracle ``SDO_EQUAL(poly, geom)`` +MySQL ``MBREquals(poly, geom)`` +SpatiaLite ``Equals(poly, geom)`` +========== ================================================= + .. fieldlookup:: intersects ``intersects`` |