Chapter 5. Using QGIS in an External Application
In Chapter 1, Getting Started with QGIS, we looked briefly at a standalone Python program built using PyQt and the PyQGIS library. In this chapter, we will use the same technique to build a complete turnkey mapping application using PyQGIS. Along the way, we will:
- Design and build a simple but complete standalone mapping application
- Learn how to use a wrapper script to handle the platform-specific dependencies before our Python program is run
- Define our application's user interface in a separate Python module so that we keep our UI separate from the application's business logic
- Dynamically show and hide map layers based on the user's preference
- Learn how to use a rule-based renderer to selectively display features based on the map's current zoom level
- See how data-defined properties can be used to calculate the font size to use for a label based on the feature's attributes
- Implement Google Maps style panning and...