Skip to content

Commit

Permalink
Minor code change.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebek committed Mar 27, 2024
1 parent 94f3ae8 commit 8846f0d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Copyright (C) 2023 by Lutra Consulting
from collections import defaultdict
from operator import itemgetter

from qgis.core import (
Expand Down Expand Up @@ -162,7 +161,7 @@ def processAlgorithm(self, parameters, context, feedback):
search_distance = self.parameterAsDouble(parameters, self.SEARCH_DISTANCE, context)
if search_distance is None:
raise QgsProcessingException(self.invalidSourceError(parameters, self.SEARCH_DISTANCE))
surface_to_pipes_distances = defaultdict(list)
surface_to_pipes_distances = {}
pipe_filter_request = QgsFeatureRequest(
[feat.id() for feat in pipe_lyr.getFeatures() if feat["sewerage_type"] in sewerage_types]
)
Expand All @@ -175,9 +174,9 @@ def processAlgorithm(self, parameters, context, feedback):
if feedback.isCanceled():
return {}
surface_fid = surface_feat.id()
surface_to_pipes_distances[surface_fid] = []
surface_geom = surface_feat.geometry()
if surface_geom.isNull():
surface_to_pipes_distances[surface_fid] = []
feedback.setProgress(100 * step / number_of_steps)
step += 1
continue
Expand Down

0 comments on commit 8846f0d

Please sign in to comment.