diff options
| author | David Smith <smithdc@gmail.com> | 2024-09-23 18:21:02 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-11-25 10:10:06 +0100 |
| commit | d86802f13fd821f006371b95d888d294297874fd (patch) | |
| tree | 7487556b06689ca860f4ee0e1fbdc26caf125973 /docs | |
| parent | e3d8f557ff3bab2b37a55db83f71ceb90bc4ebc8 (diff) | |
Fixed #35783 -- Added NumDimensions GIS database function and __num_dimensions lookup.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/db-api.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/functions.txt | 13 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/geoquerysets.txt | 22 | ||||
| -rw-r--r-- | docs/releases/6.1.txt | 5 |
4 files changed, 42 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt index b51001ecd1..8f062e503d 100644 --- a/docs/ref/contrib/gis/db-api.txt +++ b/docs/ref/contrib/gis/db-api.txt @@ -365,6 +365,7 @@ Lookup Type PostGIS Oracle MariaDB MySQL [#]_ :lookup:`intersects` X X X X X B :lookup:`isempty` X X :lookup:`isvalid` X X X (≥ 12.0.1) X X +:lookup:`num_dimensions` X X :lookup:`overlaps` X X X X X B :lookup:`relate` X X X X C :lookup:`same_as` X X X X X B @@ -420,6 +421,7 @@ Function PostGIS Oracle MariaDB MySQL :class:`LineLocatePoint` X X :class:`MakeValid` X X (LWGEOM/RTTOPO) :class:`MemSize` X +:class:`NumDimensions` X X :class:`NumGeometries` X X X X X :class:`NumPoints` X X X X X :class:`Perimeter` X X X diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index ab540627eb..2c4d344867 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -669,6 +669,19 @@ Accepts a geographic field or expression and returns its geometry type. Accepts a single geographic field or expression and returns the memory size (number of bytes) that the geometry field takes. +``NumDimensions`` +----------------- + +.. versionadded:: 6.1 + +.. class:: NumDimensions(expression, **extra) + +*Availability*: `PostGIS <https://postgis.net/docs/ST_NDims.html>`__, +SpatiaLite + +Accepts a single geometry field or expression and returns the number of +dimensions used by the geometry. + ``NumGeometries`` ----------------- diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index 6109bafb4f..70ac9d4d28 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -425,6 +425,28 @@ Oracle ``SDO_GEOMETRY.GET_GTYPE(geom)`` SpatiaLite ``GeometryType(geom)`` ========== ========================== +.. fieldlookup:: num_dimensions + +``num_dimensions`` +------------------ + +.. versionadded:: 6.1 + +*Availability*: `PostGIS <https://postgis.net/docs/ST_NDims.html>`__, +SpatiaLite + +Returns the number of dimensions used by the geometry. + +Example:: + + Zipcode.objects.filter(geom__num_dimensions=3) + +=================== ================== +Backend SQL Equivalent +=================== ================== +PostGIS, SpatiaLite ``ST_NDims(geom)`` +=================== ================== + .. fieldlookup:: overlaps ``overlaps`` diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index ae588a3fdb..0d1b6ccdca 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -118,6 +118,11 @@ Minor features :class:`IsEmpty() <django.contrib.gis.db.models.functions.IsEmpty>` database function are now supported on SpatiaLite. +* The new :lookup:`num_dimensions` lookup and :class:`NumDimensions() + <django.contrib.gis.db.models.functions.NumDimensions>` database function + allow filtering geometries by the number of dimensions on PostGIS and + SpatiaLite. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
