Fix exception in find projection algorithm

This commit is contained in:
Nyall Dawson 2017-11-15 09:59:58 +10:00
parent dd15d4ef59
commit b0c13da854

View File

@ -121,12 +121,15 @@ class FindProjection(QgisAlgorithm):
except:
continue
if engine.intersects(transformed_bounds.constGet()):
feedback.pushInfo(self.tr('Found candidate CRS: {}').format(candidate_crs.authid()))
f = QgsFeature(fields)
f.setAttributes([candidate_crs.authid()])
sink.addFeature(f, QgsFeatureSink.FastInsert)
found_results += 1
try:
if engine.intersects(transformed_bounds.constGet()):
feedback.pushInfo(self.tr('Found candidate CRS: {}').format(candidate_crs.authid()))
f = QgsFeature(fields)
f.setAttributes([candidate_crs.authid()])
sink.addFeature(f, QgsFeatureSink.FastInsert)
found_results += 1
except:
continue
feedback.setProgress(int(current * total))