diff options
| author | Marcelo Galigniana <marcelogaligniana@gmail.com> | 2022-05-13 22:51:12 -0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-05-16 06:46:53 +0200 |
| commit | 76af861356eda3b08bc5e15ad1973f980c7604a3 (patch) | |
| tree | 4811b4f55435ac40c7154c50de77b954b6c72c3a /docs | |
| parent | d27e6b233f83c3429f21ff3c250a28ff302637ef (diff) | |
Fixed #27550 -- Allowed GEOSGeometry.normalize() to return a normalized clone.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/geos.txt | 10 | ||||
| -rw-r--r-- | docs/releases/4.1.txt | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index 93fe6e9895..a8057dc631 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -665,9 +665,11 @@ Other Properties & Methods :class:`~django.contrib.gis.db.models.functions.MakeValid` database function. Requires GEOS 3.8. -.. method:: GEOSGeometry.normalize() +.. method:: GEOSGeometry.normalize(clone=False) - Converts this geometry to canonical form:: + Converts this geometry to canonical form. If the ``clone`` keyword is set, + then the geometry is not modified and a normalized clone of the geometry is + returned instead:: >>> g = MultiPoint(Point(0, 0), Point(2, 2), Point(1, 1)) >>> print(g) @@ -676,6 +678,10 @@ Other Properties & Methods >>> print(g) MULTIPOINT (2 2, 1 1, 0 0) + .. versionchanged:: 4.1 + + The ``clone`` argument was added. + ``Point`` --------- diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 38dcdb94e0..dc95a653c3 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -139,6 +139,9 @@ Minor features * The new :meth:`.GEOSGeometry.make_valid()` method allows converting invalid geometries to valid ones. +* The new ``clone`` argument for :meth:`.GEOSGeometry.normalize` allows + creating a normalized clone of the geometry. + :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
