From 514ef9456735eec6c07fa1c6f5a34aef0665fab1 Mon Sep 17 00:00:00 2001 From: Alireza Adli Date: Sat, 16 Mar 2024 16:33:47 -0400 Subject: [PATCH] Add str and data count --- scrub_layer_class.py | 4 ++++ scrub_mtl_class.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/scrub_layer_class.py b/scrub_layer_class.py index 6521dc4..b18a4bd 100644 --- a/scrub_layer_class.py +++ b/scrub_layer_class.py @@ -17,6 +17,7 @@ class ScrubLayer: self.layer_path = layer_path self.layer_name = layer_name self.layer = self.load_layer() + self.data_count = self.layer.featureCount() def load_layer(self): the_layer = QgsVectorLayer(self.layer_path, self.layer_name, 'ogr') @@ -56,6 +57,9 @@ class ScrubLayer: processing.run("native:clip", clip_layer_params) print(f'Clipping of {self.layer_name} is completed.') + def __str__(self): + return f'The {self.layer_name} has {self.data_count} records.' + @staticmethod def cleanup(): QgsApplication.exitQgis() diff --git a/scrub_mtl_class.py b/scrub_mtl_class.py index 9e0be9c..347481e 100644 --- a/scrub_mtl_class.py +++ b/scrub_mtl_class.py @@ -24,6 +24,9 @@ class ScrubMTL: def process_property_assesment(self): pass + def refine_heights(self): + pass + def remove_redundant_fields(self): pass