Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updates to geoprocessing: fix for some intersection cases
git-svn-id: http://svn.osgeo.org/qgis/trunk@10096 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Feb 3, 2009
1 parent a35d6d7 commit d033b0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/plugins/fTools/tools/doGeoprocessing.py
Expand Up @@ -467,8 +467,8 @@ def intersect( self ):
tmpGeom = QgsGeometry( inFeatB.geometry() )
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributeMap()
geom = geom.intersection( tmpGeom )
outFeat.setGeometry( geom )
int_geom = geom.intersection( tmpGeom )
outFeat.setGeometry( int_geom )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
writer.addFeature( outFeat )
del writer
Expand Down Expand Up @@ -515,13 +515,13 @@ def union( self ):
tmpGeom = QgsGeometry( inFeatB.geometry() )
if geom.intersects( tmpGeom ):
found = True
diffGeom = diffGeom.difference( tmpGeom )
geom = geom.intersection( tmpGeom )
outFeat.setGeometry( geom )
diff_geom = diff_geom.difference( tmpGeom )
int_geom = geom.intersection( tmpGeom )
outFeat.setGeometry( int_geom )
outFeat.setAttributeMap( ftools_utils.combineVectorAttributes( atMapA, atMapB ) )
writer.addFeature( outFeat )
if found:
outFeat.setGeometry( diffGeom )
outFeat.setGeometry( diff_geom )
outFeat.setAttributeMap( atMapA )
writer.addFeature( outFeat )
length = len( vproviderA.fields().values() )
Expand Down

0 comments on commit d033b0f

Please sign in to comment.