Azad Rasul


6- Retrieving information of vector layer

Azad Rasul's photo
Azad Rasul
·Jun 25, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

We use fields() on a QgsVectorLayer to retrieve information about the fields of a vector layer.

uri = "D:/Python_QGIS/data/Countries.shp"
vlayer = QgsVectorLayer(uri, "Countries", "ogr")

for field in vlayer.fields():

If you like the content, please SUBSCRIBE to my channel for the future content

Share this