Skip to content

Commit cdd8a34

Browse files
author
cfarmer
committed
updates to geoprocessing: fix for some intersection cases
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10096 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ded8497 commit cdd8a34

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/plugins/fTools/tools/doGeoprocessing.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ def intersect( self ):
467467
tmpGeom = QgsGeometry( inFeatB.geometry() )
468468
if geom.intersects( tmpGeom ):
469469
atMapB = inFeatB.attributeMap()
470-
geom = geom.intersection( tmpGeom )
471-
outFeat.setGeometry( geom )
470+
int_geom = geom.intersection( tmpGeom )
471+
outFeat.setGeometry( int_geom )
472472
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
473473
writer.addFeature( outFeat )
474474
del writer
@@ -515,13 +515,13 @@ def union( self ):
515515
tmpGeom = QgsGeometry( inFeatB.geometry() )
516516
if geom.intersects( tmpGeom ):
517517
found = True
518-
diffGeom = diffGeom.difference( tmpGeom )
519-
geom = geom.intersection( tmpGeom )
520-
outFeat.setGeometry( geom )
518+
diff_geom = diff_geom.difference( tmpGeom )
519+
int_geom = geom.intersection( tmpGeom )
520+
outFeat.setGeometry( int_geom )
521521
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
522522
writer.addFeature( outFeat )
523523
if found:
524-
outFeat.setGeometry( diffGeom )
524+
outFeat.setGeometry( diff_geom )
525525
outFeat.setAttributeMap( atMapA )
526526
writer.addFeature( outFeat )
527527
length = len( vproviderA.fields().values() )

0 commit comments

Comments
 (0)