Browse Source

Fixed spatial topology computation for equivalent relation.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57641 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 11 years ago
parent
commit
dd487a1d57
1 changed files with 9 additions and 8 deletions
  1. 9 8
      lib/python/temporal/spatio_temporal_relationships.py

+ 9 - 8
lib/python/temporal/spatio_temporal_relationships.py

@@ -693,14 +693,15 @@ def set_temoral_relationship(A, B, relation):
 def set_spatial_relationship(A, B, relation):
 
     if relation == "equivalent":
-        if not B.get_equivalent() or \
-        (B.get_equivalent() and \
-        A not in B.get_equivalent()):
-            B.append_equivalent(A)
-        if not A.get_equivalent() or \
-        (A.get_equivalent() and \
-        B not in A.get_equivalent()):
-            A.append_equivalent(B)
+	if A != B:
+            if not B.get_equivalent() or \
+            (B.get_equivalent() and \
+            A not in B.get_equivalent()):
+                B.append_equivalent(A)
+            if not A.get_equivalent() or \
+            (A.get_equivalent() and \
+            B not in A.get_equivalent()):
+                A.append_equivalent(B)
     elif relation == "overlap":
         if not B.get_overlap() or \
             (B.get_overlap() and \