Return a specific cell of a record
This commit is contained in:
parent
f67b461c43
commit
ccc7db8310
|
@ -26,6 +26,9 @@ class ScrubLayer:
|
||||||
self.layer = self.load_layer()
|
self.layer = self.load_layer()
|
||||||
self.data_count = self.layer.featureCount()
|
self.data_count = self.layer.featureCount()
|
||||||
|
|
||||||
|
def cell_content(self, fid, field_name):
|
||||||
|
return self.layer.getFeature(fid)[field_name]
|
||||||
|
|
||||||
def load_layer(self):
|
def load_layer(self):
|
||||||
the_layer = QgsVectorLayer(self.layer_path, self.layer_name, 'ogr')
|
the_layer = QgsVectorLayer(self.layer_path, self.layer_name, 'ogr')
|
||||||
if not the_layer.isValid():
|
if not the_layer.isValid():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user