Skip to content
Permalink
Browse files

store geometries from GeometryCollection in list

  • Loading branch information
alexbruy committed May 22, 2012
1 parent 5745fb9 commit 5cb6dd7c0b686890cffff1c0d4476dfa2dce57f9
Showing with 10 additions and 6 deletions.
  1. +10 −6 python/plugins/fTools/tools/doGeoprocessing.py
@@ -1145,14 +1145,18 @@ def union( self ):
if int_geom.wkbType() == 0:
# intersection produced different geometry types
temp_list = int_geom.asGeometryCollection()
int_geom = []
for i in temp_list:
if i.type() == geom.type():
try:
outFeat.setGeometry( j )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
writer.addFeature( outFeat )
except Exception, err:
FEATURE_EXCEPT = False
int_geom.append( QgsGeometry( i ) )
if len(int_geom) > 1:
for j in int_geom:
try:
outFeat.setGeometry( j )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
writer.addFeature( outFeat )
except Exception, err:
FEATURE_EXCEPT = False
try:
outFeat.setGeometry( int_geom )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )

0 comments on commit 5cb6dd7

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