Graphics Reference
In-Depth Information
Summary
In this chapter, we designed and implemented a simple but complete turnkey mapping ap-
plication using PyQGIS. In doing this, we learned how a wrapper script can be used to keep
platform-specific settings out of your Python program. We also saw how we can define our
application's UI in a separate module even if we don't use Qt Designer to create our user in-
terface templates.
We learned how to use the "PAL" labeling engine built into QGIS to display a label for
each feature within a vector map layer. We saw that a QgsRuleBasedRendererV2 ob-
ject can be used to show or hide certain features based on the map's scale factor, and that
data-defined properties allow us to calculate values such as the label's font size; we also
saw how the CASE...WHEN expression can be used to calculate data-defined properties in
sophisticated ways.
Finally, we saw how to implement Google Maps style panning and zooming within a map-
ping application.
In the next chapter, we will learn about some of the more advanced features of the QGIS
Python API and how we can use them within our mapping applications.
Search WWH ::




Custom Search