Skip to content
Permalink
Browse files

Merge pull request #760 from ddanielvaz/partial-fix-7708

Partial fix for #7708
  • Loading branch information
alexbruy committed Aug 8, 2013
2 parents b88b76b + 0523e89 commit 3e25f11845aa054f2f5441feb4cbce9fce2ea49b
Showing with 6 additions and 7 deletions.
  1. +6 −7 python/plugins/fTools/tools/doGeoprocessing.py
@@ -1092,7 +1092,7 @@ def union( self ):
indexA = ftools_utils.createIndex( vproviderB )
indexB = ftools_utils.createIndex( vproviderA )

nFeat = vproviderA.featureCount() * vproviderB.featureCount()
nFeat = vproviderA.featureCount() + vproviderB.featureCount()
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), 0)
self.emit( SIGNAL( "runRange(PyQt_PyObject)" ), ( 0, nFeat ) )

@@ -1198,12 +1198,11 @@ def union( self ):
length = len( vproviderA.fields() )

fitB = vproviderB.getFeatures()
while fitB.nextFeature( inFeatA ):
while fitB.nextFeature( inFeatB ):
add = False
geom = QgsGeometry( inFeatA.geometry() )
geom = QgsGeometry( inFeatB.geometry() )
diff_geom = QgsGeometry( geom )
atMap = inFeatA.attributes()
atMap = dict( zip( range( length, length + len( atMap ) ), atMap ) )
atMap = inFeatB.attributes()
intersects = indexB.intersects( geom.boundingBox() )

if len(intersects) < 1:
@@ -1215,8 +1214,8 @@ def union( self ):
FEATURE_EXCEPT = False
else:
for id in intersects:
vproviderB.getFeatures( QgsFeatureRequest().setFilterFid( int( id ) ) ).nextFeature( inFeatB )
tmpGeom = QgsGeometry( inFeatB.geometry() )
vproviderA.getFeatures( QgsFeatureRequest().setFilterFid( int( id ) ) ).nextFeature( inFeatA )
tmpGeom = QgsGeometry( inFeatA.geometry() )

try:
if diff_geom.intersects( tmpGeom ):

0 comments on commit 3e25f11

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