Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Building Mapping Applications with QGIS

You're reading from   Building Mapping Applications with QGIS Create your own sophisticated applications to analyze and display geospatial information using QGIS and Python

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher Packt
ISBN-13 9781783984664
Length 264 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Erik Westra Erik Westra
Author Profile Icon Erik Westra
Erik Westra
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with QGIS FREE CHAPTER 2. The QGIS Python Console 3. Learning the QGIS Python API 4. Creating QGIS Plugins 5. Using QGIS in an External Application 6. Mastering the QGIS Python API 7. Selecting and Editing Features in a PyQGIS Application 8. Building a Complete Mapping Application using Python and QGIS 9. Completing the ForestTrails Application Index

Working with symbol layers


In the previous chapters, we created symbols to display vector features by instantiating one of the three basic subclasses of QgsSymbolV2:

  • QgsMarkerSymbolV2 for point geometries

  • QgsLineSymbolV2 for line geometries

  • QgsFillSymbolV2 for polygon geometries

We did this either by calling one of the preceding class's static createSimple() methods, or by asking the QgsSymbolV2 class to provide us with the default symbol for a given type of geometry. Irrespective of how we did it, the result was a ready-to-use symbol object that displays a given type of vector geometry.

Internally, symbols consist of one or more symbol layers that are displayed one on top of the other, to draw the vector feature:

Note

The symbol layers are drawn in the order in which they are added to the symbol. So, in this example, Symbol Layer 1 will be drawn before Symbol Layer 2. This has the effect of drawing the second symbol layer on top of the first. Make sure you get the order of your symbol layers...

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 $19.99/month. Cancel anytime
Banner background image