diff options
| author | Claude Paroz <claude@2xlibre.net> | 2021-09-24 10:15:23 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-09-27 09:58:28 +0200 |
| commit | 4ffada36097ceccfd6f0d358217ac3c40d2a729c (patch) | |
| tree | 314864f4c59f246d46ec4fd2b47d2d04ea7d85bb /docs | |
| parent | fb05ca420da1341c0d39cf1f0e2fb659be836c92 (diff) | |
Fixed #33136 -- Added GEOSGeometry.make_valid() method.
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, 12 insertions, 1 deletions
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index 84de1094fc..e8a88014cc 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -655,6 +655,16 @@ Other Properties & Methods doesn't impose any constraints on the geometry's SRID if called with a :class:`~django.contrib.gis.gdal.CoordTransform` object. +.. method:: GEOSGeometry.make_valid() + + .. versionadded:: 4.1 + + Returns a valid :class:`GEOSGeometry` equivalent, trying not to lose any of + the input vertices. If the geometry is already valid, it is returned + untouched. This is similar to the + :class:`~django.contrib.gis.db.models.functions.MakeValid` database + function. Requires GEOS 3.8. + .. method:: GEOSGeometry.normalize() Converts this geometry to canonical form:: diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 28dd574af5..8401103767 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -53,7 +53,8 @@ Minor features :mod:`django.contrib.gis` ~~~~~~~~~~~~~~~~~~~~~~~~~ -* ... +* The new :meth:`.GEOSGeometry.make_valid()` method allows converting invalid + geometries to valid ones. :mod:`django.contrib.messages` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
