Skip to content

Commit

Permalink
Revert "Check validity of input geometries in intersection algorithm"
Browse files Browse the repository at this point in the history
This reverts commit dbbbf61.

Has broken some tests, needs more investigation
  • Loading branch information
m-kuhn committed Oct 20, 2016
1 parent dbbbf61 commit 01e570c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python/plugins/processing/algs/qgis/Intersection.py
Expand Up @@ -85,16 +85,12 @@ def processAlgorithm(self, progress):
for current, inFeatA in enumerate(selectionA):
progress.setPercentage(int(current * total))
geom = QgsGeometry(inFeatA.geometry())
if not geom.isGeosValid():
raise GeoAlgorithmExecutionException(
self.tr('Input layer A contains invalid geometries. Unable to complete intersection algorithm.'))
atMapA = inFeatA.attributes()
intersects = index.intersects(geom.boundingBox())
for inFeatB in vlayerB.getFeatures(QgsFeatureRequest().setFilterFids(intersects)):
for i in intersects:
request = QgsFeatureRequest().setFilterFid(i)
inFeatB = vlayerB.getFeatures(request).next()
tmpGeom = QgsGeometry(inFeatB.geometry())
if not tmpGeom.isGeosValid():
raise GeoAlgorithmExecutionException(
self.tr('Input layer B contains invalid geometries. Unable to complete intersection algorithm.'))
if geom.intersects(tmpGeom):
atMapB = inFeatB.attributes()
int_geom = QgsGeometry(geom.intersection(tmpGeom))
Expand Down

0 comments on commit 01e570c

Please sign in to comment.