diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-10-09 17:15:16 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-10-11 12:24:33 +0200 |
| commit | 617b1a21f5a661ef44030c1662440cc5be158ec0 (patch) | |
| tree | 2d5ded9d1afc783e499317bf39353c5c0fa63925 /docs | |
| parent | 67732a9b183d2e84c85147b04fdf9499f4395ac6 (diff) | |
Fixed #25498 -- Documented ST_Distance/ST_Distance_Sphere difference
Thanks Bibhas Debnath for the report and Tim Graham for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/geoquerysets.txt | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index 8b554ece06..c20975fa19 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -523,7 +523,8 @@ With PostGIS, on every distance lookup but :lookup:`dwithin`, an optional third element, ``'spheroid'``, may be included to tell GeoDjango to use the more accurate spheroid distance calculation functions on fields with a geodetic coordinate system (e.g., ``ST_Distance_Spheroid`` -would be used instead of ``ST_Distance_Sphere``). +would be used instead of ``ST_Distance_Sphere``). The simpler ``ST_Distance`` +function is used with projected coordinate systems. .. versionadded:: 1.10 @@ -541,13 +542,13 @@ Example:: Zipcode.objects.filter(poly__distance_gt=(geom, D(m=5))) -========== =============================================== +========== ================================================== Backend SQL Equivalent -========== =============================================== -PostGIS ``ST_Distance(poly, geom) > 5`` +========== ================================================== +PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) > 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) > 5`` SpatiaLite ``Distance(poly, geom) > 5`` -========== =============================================== +========== ================================================== .. fieldlookup:: distance_gte @@ -561,13 +562,13 @@ Example:: Zipcode.objects.filter(poly__distance_gte=(geom, D(m=5))) -========== ================================================ +========== =================================================== Backend SQL Equivalent -========== ================================================ -PostGIS ``ST_Distance(poly, geom) >= 5`` +========== =================================================== +PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) >= 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) >= 5`` SpatiaLite ``Distance(poly, geom) >= 5`` -========== ================================================ +========== =================================================== .. fieldlookup:: distance_lt @@ -581,13 +582,13 @@ Example:: Zipcode.objects.filter(poly__distance_lt=(geom, D(m=5))) -========== =============================================== +========== ================================================== Backend SQL Equivalent -========== =============================================== -PostGIS ``ST_Distance(poly, geom) < 5`` +========== ================================================== +PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) < 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) < 5`` SpatiaLite ``Distance(poly, geom) < 5`` -========== =============================================== +========== ================================================== .. fieldlookup:: distance_lte @@ -601,13 +602,13 @@ Example:: Zipcode.objects.filter(poly__distance_lte=(geom, D(m=5))) -========== ================================================ +========== =================================================== Backend SQL Equivalent -========== ================================================ -PostGIS ``ST_Distance(poly, geom) <= 5`` +========== =================================================== +PostGIS ``ST_Distance/ST_Distance_Sphere(poly, geom) <= 5`` Oracle ``SDO_GEOM.SDO_DISTANCE(poly, geom, 0.05) <= 5`` SpatiaLite ``Distance(poly, geom) <= 5`` -========== ================================================ +========== =================================================== .. fieldlookup:: dwithin |
