mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #27550 -- Allowed GEOSGeometry.normalize() to return a normalized clone.
This commit is contained in:
parent
d27e6b233f
commit
76af861356
4 changed files with 32 additions and 9 deletions
|
@ -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``
|
||||
---------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue