diff options
| author | Claude Paroz <claude@2xlibre.net> | 2022-12-31 15:32:35 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-03 05:47:44 +0100 |
| commit | 2a14b8df39b573124ea42dec0ce96147c8e767d4 (patch) | |
| tree | c18003040c58d555c245ab1fe5e1e3085754eade /docs/ref | |
| parent | 6774e9359cbdbf7b8c448597c103288ac381519a (diff) | |
Fixed #33783 -- Added IsEmpty GIS database function and __isempty lookup on PostGIS.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/gis/db-api.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/functions.txt | 22 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/geoquerysets.txt | 15 |
3 files changed, 34 insertions, 5 deletions
diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt index bc216c7caf..97f1f6ca6b 100644 --- a/docs/ref/contrib/gis/db-api.txt +++ b/docs/ref/contrib/gis/db-api.txt @@ -316,6 +316,7 @@ Lookup Type PostGIS Oracle MariaDB MySQL [#]_ Sp :lookup:`equals` X X X X X C :lookup:`exact <same_as>` X X X X X B :lookup:`intersects` X X X X X B +:lookup:`isempty` X :lookup:`isvalid` X X X X :lookup:`overlaps` X X X X X B :lookup:`relate` X X X X C @@ -361,6 +362,7 @@ Function PostGIS Oracle MariaDB MySQL :class:`ForcePolygonCW` X X :class:`GeoHash` X X X (LWGEOM/RTTOPO) :class:`Intersection` X X X X X +:class:`IsEmpty` X :class:`IsValid` X X X X :class:`Length` X X X X X :class:`LineLocatePoint` X X diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 00c48e665e..1c062515c6 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -23,11 +23,11 @@ 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:`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:`AsWKB` +:class:`Area` :class:`Azimuth` :class:`Difference` :class:`ForcePolygonCW` :class:`AsGeoJSON` :class:`IsEmpty` +:class:`Distance` :class:`BoundingCircle` :class:`Intersection` :class:`MakeValid` :class:`AsGML` :class:`IsValid` +:class:`GeometryDistance` :class:`Centroid` :class:`SymDifference` :class:`Reverse` :class:`AsKML` :class:`MemSize` +:class:`Length` :class:`Envelope` :class:`Union` :class:`Scale` :class:`AsSVG` :class:`NumGeometries` +:class:`Perimeter` :class:`LineLocatePoint` :class:`SnapToGrid` :class:`AsWKB` :class:`NumPoints` .. :class:`PointOnSurface` :class:`Transform` :class:`AsWKT` .. :class:`Translate` :class:`GeoHash` ========================= ======================== ====================== ======================= ================== ===================== @@ -368,6 +368,18 @@ it provides index-assisted nearest-neighbor result sets. Accepts two geographic fields or expressions and returns the geometric intersection between them. +``IsEmpty`` +=========== + +.. versionadded:: 4.2 + +.. class:: IsEmpty(expr) + +*Availability*: `PostGIS <https://postgis.net/docs/ST_IsEmpty.html>`__ + +Accepts a geographic field or expression and tests if the value is an empty +geometry. Returns ``True`` if its value is empty and ``False`` otherwise. + ``IsValid`` =========== diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index 760d508b17..53a8b6c3b9 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -346,6 +346,21 @@ MySQL ``ST_Intersects(poly, geom)`` SpatiaLite ``Intersects(poly, geom)`` ========== ================================================= +.. fieldlookup:: isempty + +``isempty`` +----------- + +.. versionadded:: 4.2 + +*Availability*: `PostGIS <https://postgis.net/docs/ST_IsEmpty.html>`__ + +Tests if the geometry is empty. + +Example:: + + Zipcode.objects.filter(poly__isempty=True) + .. fieldlookup:: isvalid ``isvalid`` |
