Skip to content


Browse files Browse the repository at this point in the history
[processing] Don't abort heatmap if adding single feature fails
  • 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/
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('Error adding feature to heatmap'))
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,'Error adding feature with ID {} to heatmap').format(

progress.setPercentage(int(current * total))

Expand Down

0 comments on commit a4838e1

Please sign in to comment.