Summary

In this chapter, we explored the Mapnik map-generation toolkit in depth. We learned that maps are composed of multiple layers, drawn one on top of the other using the painter's algorithm. We saw that each layer has a data source and a list of styles that determine how the data is to be displayed. Styles are referred to by name, so they can be shared between the various map layers.

We learned that each style has a list of rules associated with it, where each rule can optionally have a filter limiting the set of features to be displayed as well as a list of symbolizers that control how the matching features are to be drawn.

We then saw how the mapnik.Map object combines the styles and map layers and how the map can be used to zoom in to a ...

Get Python Geospatial Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.