Skip to content

Commit 97d006c

Browse files
committedMay 6, 2013
[sextante] fixed union algorithm
1 parent 0164058 commit 97d006c

File tree

1 file changed

+4
-5
lines changed
  • python/plugins/sextante/algs/ftools

1 file changed

+4
-5
lines changed
 

‎python/plugins/sextante/algs/ftools/Union.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,13 @@ def processAlgorithm(self, progress):
160160
diff_geom = QgsGeometry( geom )
161161
atMap = [None] * length
162162
atMap.extend(inFeatA.attributes())
163-
#atMap = dict( zip( range( length, length + len( atMap ) ), atMap ) )
164163
intersects = indexB.intersects( geom.boundingBox() )
165164

166165
if len(intersects) < 1:
167166
try:
168-
outFeat.setGeometry( geom )
169-
outFeat.setAttributes( atMap )
170-
writer.addFeature( outFeat )
167+
outFeat.setGeometry(geom)
168+
outFeat.setAttributes(atMap)
169+
writer.addFeature(outFeat)
171170
except Exception, err:
172171
raise GeoAlgorithmExecutionException("Feature exception while computing union")
173172
else:
@@ -192,7 +191,7 @@ def processAlgorithm(self, progress):
192191
if add:
193192
try:
194193
outFeat.setGeometry( diff_geom )
195-
outFeat.setAttributes( atMapB )
194+
outFeat.setAttributes(atMap)
196195
writer.addFeature( outFeat )
197196
except Exception, err:
198197
raise err

0 commit comments

Comments
 (0)
Please sign in to comment.