mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Merge pull request #760 from ddanielvaz/partial-fix-7708
Partial fix for #7708
This commit is contained in:
commit
3e25f11845
@ -1092,7 +1092,7 @@ class geoprocessingThread( QThread ):
|
||||
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 @@ class geoprocessingThread( QThread ):
|
||||
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 @@ class geoprocessingThread( QThread ):
|
||||
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 ):
|
||||
|
Loading…
x
Reference in New Issue
Block a user