Add str and data count

This commit is contained in:
Alireza Adli 2024-03-16 16:33:47 -04:00
parent 109c3cba61
commit 514ef94567
2 changed files with 7 additions and 0 deletions

View File

@ -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()

View File

@ -24,6 +24,9 @@ class ScrubMTL:
def process_property_assesment(self):
pass
def refine_heights(self):
pass
def remove_redundant_fields(self):
pass