Skip to content

Commit

Permalink
[sextante] fixed union algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed May 6, 2013
1 parent 0164058 commit 97d006c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/plugins/sextante/algs/ftools/Union.py
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 97d006c

Please sign in to comment.