Skip to content
Permalink
Browse files

[sextante] fixed union algorithm

  • Loading branch information
volaya committed May 6, 2013
1 parent 0164058 commit 97d006cda14b9bed4cb6d91fa84feda70d9a1afb
Showing with 4 additions and 5 deletions.
  1. +4 −5 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

0 comments on commit 97d006c

Please sign in to comment.
You can’t perform that action at this time.