Skip to content

Commit

Permalink
[processing] Don't abort heatmap if adding single feature fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 2, 2017
1 parent ef0131d commit a4838e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/algs/qgis/Heatmap.py
Expand Up @@ -32,6 +32,7 @@
from qgis.core import QgsFeatureRequest
from qgis.analysis import QgsKernelDensityEstimation

from processing.core.ProcessingLog import ProcessingLog
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
Expand Down Expand Up @@ -166,8 +167,8 @@ def processAlgorithm(self, progress):
total = 100.0 / len(features)
for current, f in enumerate(features):
if kde.addFeature(f) != QgsKernelDensityEstimation.Success:
raise GeoAlgorithmExecutionException(
self.tr('Error adding feature to heatmap'))
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Error adding feature with ID {} to heatmap').format(f.id()))

progress.setPercentage(int(current * total))

Expand Down

0 comments on commit a4838e1

Please sign in to comment.