diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2015-11-25 23:59:57 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-11-25 17:31:24 -0500 |
| commit | f920be7c329b3de77d1ea306a6104487ce1228fb (patch) | |
| tree | 457e0a1a7f22c0bb2cb40791cd8fe933bf52ed90 /django | |
| parent | 0cfe589f9563f283cbffd03d95c7f9e8e63345b9 (diff) | |
Fixed #25773 -- Deprecated the geos.MultiPolygon.cascaded_union property.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/geos/collections.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/gis/geos/collections.py b/django/contrib/gis/geos/collections.py index 4649a895a0..0f27d2bcf9 100644 --- a/django/contrib/gis/geos/collections.py +++ b/django/contrib/gis/geos/collections.py @@ -3,6 +3,7 @@ GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ import json +import warnings from ctypes import byref, c_int, c_uint from django.contrib.gis.geos import prototypes as capi @@ -13,6 +14,7 @@ from django.contrib.gis.geos.libgeos import get_pointer_arr from django.contrib.gis.geos.linestring import LinearRing, LineString from django.contrib.gis.geos.point import Point from django.contrib.gis.geos.polygon import Polygon +from django.utils.deprecation import RemovedInDjango20Warning from django.utils.six.moves import range @@ -135,6 +137,10 @@ class MultiPolygon(GeometryCollection): @property def cascaded_union(self): "Returns a cascaded union of this MultiPolygon." + warnings.warn( + "`cascaded_union` is deprecated, use the `unary_union` property instead.", + RemovedInDjango20Warning, 2 + ) return GEOSGeometry(capi.geos_cascaded_union(self.ptr), self.srid) # Setting the allowed types here since GeometryCollection is defined before |
