diff --git a/travel_time_platform_plugin/algorithms/advanced.py b/travel_time_platform_plugin/algorithms/advanced.py index badd550..84dc639 100644 --- a/travel_time_platform_plugin/algorithms/advanced.py +++ b/travel_time_platform_plugin/algorithms/advanced.py @@ -901,6 +901,7 @@ def processAlgorithmOutput(self, results, parameters, context, feedback): output_fields = QgsFields(locations.fields()) output_fields.append(QgsField("search_id", QVariant.String, "text")) + output_fields.append(QgsField("location_id", QVariant.String, "text")) output_fields.append(QgsField("reachable", QVariant.Int, "int")) for prop in self.enabled_properties(): @@ -928,6 +929,7 @@ def clone_feature(id_): for properties in location["properties"]: feature = clone_feature(location["id"]) feature.setAttribute("search_id", result["search_id"]) + feature.setAttribute("location_id", location["id"]) feature.setAttribute("reachable", 1) for prop in self.enabled_properties(): feature.setAttribute( @@ -937,6 +939,7 @@ def clone_feature(id_): for id_ in result["unreachable"]: feature = clone_feature(id_) feature.setAttribute("search_id", result["search_id"]) + feature.setAttribute("location_id", id_) feature.setAttribute("reachable", 0) sink.addFeature(feature, QgsFeatureSink.FastInsert)