@@ -24,7 +24,6 @@ class ConeforInputsBase(base.Base):
2424 "nodes_to_add_attribute" ,
2525 "Which attribute to use for the 'nodes to add' Conefor feature"
2626 )
27- INPUT_DISTANCE_THRESHOLD = ("distance_threshold" , "Distance threshold" )
2827 INPUT_OUTPUT_DIRECTORY = ("output_dir" , "Output directory for generated Conefor input files" )
2928 OUTPUT_CONEFOR_NODES_FILE_PATH = ("output_path" , "Conefor nodes file" )
3029 OUTPUT_CONEFOR_CONNECTIONS_FILE_PATH = ("output_connections_path" , "Conefor connections file" )
@@ -114,7 +113,6 @@ def _generate_connection_file_by_centroid_distance(
114113 source : qgis .core .QgsProcessingFeatureSource ,
115114 output_dir : Path ,
116115 filename_fragment : str ,
117- distance_threshold : Optional [int ],
118116 feedback : qgis .core .QgsProcessingFeedback ,
119117 progress_step : float ,
120118 start_progress : int = 0 ,
@@ -133,7 +131,6 @@ def _generate_connection_file_by_centroid_distance(
133131 progress_step = progress_step ,
134132 info_callback = feedback .pushInfo ,
135133 cancelled_callback = feedback .isCanceled ,
136- distance_threshold = distance_threshold ,
137134 )
138135 )
139136
@@ -185,15 +182,6 @@ def initAlgorithm(self, configuration=None):
185182 optional = True ,
186183 )
187184 )
188- self .addParameter (
189- qgis .core .QgsProcessingParameterNumber (
190- name = self .INPUT_DISTANCE_THRESHOLD [0 ],
191- description = self .tr (self .INPUT_DISTANCE_THRESHOLD [1 ]),
192- type = qgis .core .QgsProcessingParameterNumber .Integer ,
193- optional = True ,
194- minValue = 0 ,
195- )
196- )
197185 self .addParameter (
198186 qgis .core .QgsProcessingParameterFolderDestination (
199187 name = self .INPUT_OUTPUT_DIRECTORY [0 ],
@@ -229,12 +217,6 @@ def processAlgorithm(self, parameters, context, feedback):
229217 node_id_field_name = None
230218 else :
231219 node_id_field_name = raw_node_id_field_name
232- raw_distance_threshold = self .parameterAsString (
233- parameters , self .INPUT_DISTANCE_THRESHOLD [0 ], context )
234- if raw_distance_threshold == "" :
235- connections_distance_threshold = None
236- else :
237- connections_distance_threshold = int (raw_distance_threshold )
238220 output_dir = Path (
239221 self .parameterAsFile (
240222 parameters ,
@@ -259,7 +241,6 @@ def processAlgorithm(self, parameters, context, feedback):
259241 feedback .pushInfo (f"{ node_id_field_name = } " )
260242 feedback .pushInfo (f"{ node_attribute_field_name = } " )
261243 feedback .pushInfo (f"{ nodes_to_add_field_name = } " )
262- feedback .pushInfo (f"{ connections_distance_threshold = } " )
263244 feedback .pushInfo (f"{ output_dir = } " )
264245
265246 result = {
@@ -325,7 +306,6 @@ def processAlgorithm(self, parameters, context, feedback):
325306 source ,
326307 output_dir ,
327308 results_name_fragment ,
328- connections_distance_threshold ,
329309 feedback ,
330310 start_progress = (100 - remaining_progress ),
331311 progress_step = progress_step ,
@@ -422,15 +402,6 @@ def initAlgorithm(self, configuration=None):
422402 defaultValue = NodeConnectionType .EDGE_DISTANCE .value
423403 )
424404 )
425- self .addParameter (
426- qgis .core .QgsProcessingParameterNumber (
427- name = self .INPUT_DISTANCE_THRESHOLD [0 ],
428- description = self .tr (self .INPUT_DISTANCE_THRESHOLD [1 ]),
429- type = qgis .core .QgsProcessingParameterNumber .Integer ,
430- optional = True ,
431- minValue = 0 ,
432- )
433- )
434405 self .addParameter (
435406 qgis .core .QgsProcessingParameterFolderDestination (
436407 name = self .INPUT_OUTPUT_DIRECTORY [0 ],
@@ -480,12 +451,6 @@ def processAlgorithm(self, parameters, context, feedback):
480451 ]
481452 )
482453 feedback .pushInfo (f"{ connections_distance_method .value = } " )
483- raw_distance_threshold = self .parameterAsString (
484- parameters , self .INPUT_DISTANCE_THRESHOLD [0 ], context )
485- if raw_distance_threshold == "" :
486- connections_distance_threshold = None
487- else :
488- connections_distance_threshold = int (raw_distance_threshold )
489454 output_dir = Path (
490455 self .parameterAsFile (
491456 parameters ,
@@ -514,7 +479,6 @@ def processAlgorithm(self, parameters, context, feedback):
514479 feedback .pushInfo (f"{ node_id_field_name = } " )
515480 feedback .pushInfo (f"{ nodes_to_add_field_name = } " )
516481 feedback .pushInfo (f"{ connections_distance_method = } " )
517- feedback .pushInfo (f"{ connections_distance_threshold = } " )
518482 feedback .pushInfo (f"{ output_dir = } " )
519483
520484 result = {
@@ -600,7 +564,6 @@ def processAlgorithm(self, parameters, context, feedback):
600564 source ,
601565 output_dir ,
602566 results_name_fragment ,
603- connections_distance_threshold ,
604567 feedback ,
605568 start_progress = (100 - remaining_progress ),
606569 progress_step = progress_step ,
@@ -611,7 +574,6 @@ def processAlgorithm(self, parameters, context, feedback):
611574 source ,
612575 output_dir ,
613576 results_name_fragment ,
614- connections_distance_threshold ,
615577 feedback ,
616578 start_progress = (100 - remaining_progress ),
617579 progress_step = progress_step ,
@@ -630,7 +592,6 @@ def _generate_connection_file_by_edge_distance(
630592 source : qgis .core .QgsProcessingFeatureSource ,
631593 output_dir : Path ,
632594 filename_fragment : str ,
633- distance_threshold : Optional [int ],
634595 feedback : qgis .core .QgsProcessingFeedback ,
635596 start_progress : float ,
636597 progress_step : float ,
@@ -647,7 +608,6 @@ def _generate_connection_file_by_edge_distance(
647608 progress_step = progress_step ,
648609 info_callback = feedback .pushInfo ,
649610 cancelled_callback = feedback .isCanceled ,
650- distance_threshold = distance_threshold
651611 )
652612 )
653613
0 commit comments