[GRASS-SVN] r57641 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 11 12:54:07 PDT 2013
Author: huhabla
Date: 2013-09-11 12:54:07 -0700 (Wed, 11 Sep 2013)
New Revision: 57641
Modified:
grass/trunk/lib/python/temporal/spatio_temporal_relationships.py
Log:
Fixed spatial topology computation for equivalent relation.
Modified: grass/trunk/lib/python/temporal/spatio_temporal_relationships.py
===================================================================
--- grass/trunk/lib/python/temporal/spatio_temporal_relationships.py 2013-09-11 18:29:43 UTC (rev 57640)
+++ grass/trunk/lib/python/temporal/spatio_temporal_relationships.py 2013-09-11 19:54:07 UTC (rev 57641)
@@ -693,14 +693,15 @@
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 \
More information about the grass-commit
mailing list