Skip to content

Commit b14ffb7

Browse files
committed
fTools/union: fix output attribute shift
1 parent 17d5fe9 commit b14ffb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/plugins/fTools/tools/doGeoprocessing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1196,13 +1196,14 @@ def union( self ):
11961196
FEATURE_EXCEPT = False
11971197

11981198
length = len( vproviderA.fields() )
1199+
atMapA = [None] * length
11991200

12001201
fitB = vproviderB.getFeatures()
12011202
while fitB.nextFeature( inFeatB ):
12021203
add = False
12031204
geom = QgsGeometry( inFeatB.geometry() )
12041205
diff_geom = QgsGeometry( geom )
1205-
atMap = inFeatB.attributes()
1206+
atMap = atMapA + inFeatB.attributes()
12061207
intersects = indexB.intersects( geom.boundingBox() )
12071208

12081209
if len(intersects) < 1:

0 commit comments

Comments
 (0)