File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
python/plugins/fTools/tools Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1145,14 +1145,18 @@ def union( self ):
1145
1145
if int_geom .wkbType () == 0 :
1146
1146
# intersection produced different geometry types
1147
1147
temp_list = int_geom .asGeometryCollection ()
1148
+ int_geom = []
1148
1149
for i in temp_list :
1149
1150
if i .type () == geom .type ():
1150
- try :
1151
- outFeat .setGeometry ( j )
1152
- outFeat .setAttributeMap ( ftools_utils .combineVectorAttributes ( atMapA , atMapB ) )
1153
- writer .addFeature ( outFeat )
1154
- except Exception , err :
1155
- FEATURE_EXCEPT = False
1151
+ int_geom .append ( QgsGeometry ( i ) )
1152
+ if len (int_geom ) > 1 :
1153
+ for j in int_geom :
1154
+ try :
1155
+ outFeat .setGeometry ( j )
1156
+ outFeat .setAttributeMap ( ftools_utils .combineVectorAttributes ( atMapA , atMapB ) )
1157
+ writer .addFeature ( outFeat )
1158
+ except Exception , err :
1159
+ FEATURE_EXCEPT = False
1156
1160
try :
1157
1161
outFeat .setGeometry ( int_geom )
1158
1162
outFeat .setAttributeMap ( ftools_utils .combineVectorAttributes ( atMapA , atMapB ) )
You can’t perform that action at this time.
0 commit comments