summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorFrancisco Couzo <franciscouzo@gmail.com>2019-03-20 13:54:42 -0300
committerTim Graham <timograham@gmail.com>2019-03-20 12:54:42 -0400
commit0193bf874f08f21cdec628b8d80d261471bfe5fc (patch)
treee095cbff7cd8c6a0abf98f2378f1d99747daa5dc /docs/ref
parent638d5ea37557a668f59d76bb34ee4e076787b524 (diff)
Fixed #28738 -- Added the GeometryDistance function.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/gis/functions.txt35
1 files changed, 24 insertions, 11 deletions
diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt
index b1f07ff745..4a4e1b406b 100644
--- a/docs/ref/contrib/gis/functions.txt
+++ b/docs/ref/contrib/gis/functions.txt
@@ -20,17 +20,17 @@ get a ``NotImplementedError`` exception.
Function's summary:
-================== ======================== ====================== ======================= ================== =====================
-Measurement Relationships Operations Editors Output format Miscellaneous
-================== ======================== ====================== ======================= ================== =====================
-:class:`Area` :class:`Azimuth` :class:`Difference` :class:`ForcePolygonCW` :class:`AsGeoJSON` :class:`IsValid`
-:class:`Distance` :class:`BoundingCircle` :class:`Intersection` :class:`MakeValid` :class:`AsGML` :class:`MemSize`
-:class:`Length` :class:`Centroid` :class:`SymDifference` :class:`Reverse` :class:`AsKML` :class:`NumGeometries`
-:class:`Perimeter` :class:`Envelope` :class:`Union` :class:`Scale` :class:`AsSVG` :class:`NumPoints`
-.. :class:`LineLocatePoint` :class:`SnapToGrid` :class:`GeoHash`
-.. :class:`PointOnSurface` :class:`Transform`
-.. :class:`Translate`
-================== ======================== ====================== ======================= ================== =====================
+========================= ======================== ====================== ======================= ================== =====================
+Measurement Relationships Operations Editors Output format Miscellaneous
+========================= ======================== ====================== ======================= ================== =====================
+:class:`Area` :class:`Azimuth` :class:`Difference` :class:`ForcePolygonCW` :class:`AsGeoJSON` :class:`IsValid`
+:class:`Distance` :class:`BoundingCircle` :class:`Intersection` :class:`MakeValid` :class:`AsGML` :class:`MemSize`
+:class:`GeometryDistance` :class:`Centroid` :class:`SymDifference` :class:`Reverse` :class:`AsKML` :class:`NumGeometries`
+:class:`Length` :class:`Envelope` :class:`Union` :class:`Scale` :class:`AsSVG` :class:`NumPoints`
+:class:`Perimeter` :class:`LineLocatePoint` :class:`SnapToGrid` :class:`GeoHash`
+.. :class:`PointOnSurface` :class:`Transform`
+.. :class:`Translate`
+========================= ======================== ====================== ======================= ================== =====================
``Area``
========
@@ -308,6 +308,19 @@ result.
__ https://en.wikipedia.org/wiki/Geohash
+``GeometryDistance``
+====================
+
+.. class:: GeometryDistance(expr1, expr2, **extra)
+
+.. versionadded:: 3.0
+
+*Availability*: `PostGIS <https://postgis.net/docs/geometry_distance_knn.html>`__
+
+Accepts two geographic fields or expressions and returns the distance between
+them. When used in an :meth:`~django.db.models.query.QuerySet.order_by` clause,
+it provides index-assisted nearest-neighbor result sets.
+
``Intersection``
================