Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QGIS Quick Start Guide

You're reading from   QGIS Quick Start Guide A beginner's guide to getting started with QGIS 3.4

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789341157
Length 164 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Andrew Cutts Andrew Cutts
Author Profile Icon Andrew Cutts
Andrew Cutts
Arrow right icon
View More author details
Toc

Using the Python command line

From the Plugins toolbar, select the Python Console button, or press Ctrl + Alt + P, or select Python Console from the Plugins menu.

Python has become the programming language of choice for GIS. In this book, we will just look at the basics of the QGIS API. As you become more advanced, you can use Python to develop your own plugins and custom scripts. Eventually, you could use the QGIS Python library (PyQGIS), external to QGIS, to build applications.

Open a new empty QGIS project.

Loading a layer

To load a vector layer, we use the addVectorLayer() function of iface. The iface class is used to access the graphical part of the QGIS interface. In the following example, I am adding airport.shp to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime