summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/geos/geometry.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py
index bcda25fa2f..1ebecc864b 100644
--- a/django/contrib/gis/geos/geometry.py
+++ b/django/contrib/gis/geos/geometry.py
@@ -144,6 +144,9 @@ class GEOSGeometryBase(GEOSBase):
return False
return isinstance(other, GEOSGeometry) and self.srid == other.srid and self.equals_exact(other)
+ def __hash__(self):
+ return hash((self.srid, self.wkt))
+
# ### Geometry set-like operations ###
# Thanks to Sean Gillies for inspiration:
# http://lists.gispython.org/pipermail/community/2007-July/001034.html