January 2019
Beginner
164 pages
3h 15m
English
The command line can get confusing. It is better to build scripts and test on the command line. Let's convert these command-line calls into a Python script. Close this project and open a new QGIS project. Open the Python Console.
Click on the Show Editor button to open a scripting window. This is shown in the following screenshot:

Copy the following code into the script editor:
Airport_layer = iface.addVectorLayer('D:/QGIS_quickstart/qgis_sample_data/shapefiles/airports.shp','airports','ogr')Alaska_layer = iface.addVectorLayer('D:/QGIS_quickstart/qgis_sample_data/shapefiles/alaska.shp','alaska','ogr')print (Airport_layer.name()) ...Read now
Unlock full access