From 8047961d7c9d5af1cd289b28da3edf6e16a2678e Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 16 Oct 2019 14:39:13 +0200 Subject: [PATCH] [3.0.x] Refs #28436 -- Corrected docs regarding MySQL support of distance lookups. Backport of 440603a4bc0dc4f0b489489e80dcbab0ca736d23 from master --- docs/ref/contrib/gis/db-api.txt | 12 ++++++------ docs/ref/contrib/gis/geoquerysets.txt | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt index b8614beab7f..88c2676eb40 100644 --- a/docs/ref/contrib/gis/db-api.txt +++ b/docs/ref/contrib/gis/db-api.txt @@ -219,7 +219,7 @@ in the :doc:`model-api` documentation for more details. Distance Lookups ---------------- -*Availability*: PostGIS, Oracle, SpatiaLite, PGRaster (Native) +*Availability*: PostGIS, MySQL, Oracle, SpatiaLite, PGRaster (Native) The following distance lookups are available: @@ -227,7 +227,7 @@ The following distance lookups are available: * :lookup:`distance_lte` * :lookup:`distance_gt` * :lookup:`distance_gte` -* :lookup:`dwithin` +* :lookup:`dwithin` (except MySQL) .. note:: @@ -322,10 +322,10 @@ Lookup Type PostGIS Oracle MySQL [#]_ SpatiaLite :lookup:`covers` X X X B :lookup:`crosses` X X X C :lookup:`disjoint` X X X X B -:lookup:`distance_gt` X X X N -:lookup:`distance_gte` X X X N -:lookup:`distance_lt` X X X N -:lookup:`distance_lte` X X X N +:lookup:`distance_gt` X X X X N +:lookup:`distance_gte` X X X X N +:lookup:`distance_lt` X X X X N +:lookup:`distance_lte` X X X X N :lookup:`dwithin` X X X B :lookup:`equals` X X X X C :lookup:`exact` X X X X B diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index ff9dccaa4d6..6b1b888f6a5 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -765,6 +765,7 @@ Example:: Backend SQL Equivalent ========== ================================================== PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) > 5`` +MySQL ``ST_Distance(poly, geom) > 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) > 5`` SpatiaLite ``Distance(poly, geom) > 5`` ========== ================================================== @@ -785,6 +786,7 @@ Example:: Backend SQL Equivalent ========== =================================================== PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) >= 5`` +MySQL ``ST_Distance(poly, geom) >= 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) >= 5`` SpatiaLite ``Distance(poly, geom) >= 5`` ========== =================================================== @@ -805,6 +807,7 @@ Example:: Backend SQL Equivalent ========== ================================================== PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) < 5`` +MySQL ``ST_Distance(poly, geom) < 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) < 5`` SpatiaLite ``Distance(poly, geom) < 5`` ========== ================================================== @@ -825,6 +828,7 @@ Example:: Backend SQL Equivalent ========== =================================================== PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) <= 5`` +MySQL ``ST_Distance(poly, geom) <= 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) <= 5`` SpatiaLite ``Distance(poly, geom) <= 5`` ========== ===================================================