From 97d006cda14b9bed4cb6d91fa84feda70d9a1afb Mon Sep 17 00:00:00 2001 From: Victor Olaya Date: Mon, 6 May 2013 23:07:42 +0200 Subject: [PATCH] [sextante] fixed union algorithm --- python/plugins/sextante/algs/ftools/Union.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/plugins/sextante/algs/ftools/Union.py b/python/plugins/sextante/algs/ftools/Union.py index b1db53da60ee..c4668acbda73 100644 --- a/python/plugins/sextante/algs/ftools/Union.py +++ b/python/plugins/sextante/algs/ftools/Union.py @@ -160,14 +160,13 @@ def processAlgorithm(self, progress): diff_geom = QgsGeometry( geom ) atMap = [None] * length atMap.extend(inFeatA.attributes()) - #atMap = dict( zip( range( length, length + len( atMap ) ), atMap ) ) intersects = indexB.intersects( geom.boundingBox() ) if len(intersects) < 1: try: - outFeat.setGeometry( geom ) - outFeat.setAttributes( atMap ) - writer.addFeature( outFeat ) + outFeat.setGeometry(geom) + outFeat.setAttributes(atMap) + writer.addFeature(outFeat) except Exception, err: raise GeoAlgorithmExecutionException("Feature exception while computing union") else: @@ -192,7 +191,7 @@ def processAlgorithm(self, progress): if add: try: outFeat.setGeometry( diff_geom ) - outFeat.setAttributes( atMapB ) + outFeat.setAttributes(atMap) writer.addFeature( outFeat ) except Exception, err: raise err