Fixed #33136 -- Added GEOSGeometry.make_valid() method.

This commit is contained in:
Claude Paroz 2021-09-24 10:15:23 +02:00 committed by Mariusz Felisiak
parent fb05ca420d
commit 4ffada3609
6 changed files with 45 additions and 5 deletions

View file

@ -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::