Slide 1

Slide 1 text

Mapnik: An Overview June 18, 2010 – NWWaGIS

Slide 2

Slide 2 text

What is Mapnik? • Toolkit for generating static map images – Most commonly used for generating custom web- mapping tiles. • Cross-platform – Windows Binaries available • Accepts many data formats – SHP/PostGIS/TIFF/OSM/GDAL/OGR • Produces many data outputs – PNG/JPEG/SVG/PDF • Built-in WMS Server

Slide 3

Slide 3 text

Who is using it? • OpenStreetMap • Cloudmade • EveryBlock • Others

Slide 4

Slide 4 text

How does it work?

Slide 5

Slide 5 text

Styling • Multiple rules style a single feature • Features rendered in a ‘Painters Order’

Slide 6

Slide 6 text

Styling • Mapfile can be large – OpenStreetMap XML: • 6763 lines long • 30 Layers • 106 Styles • 628 Rules

Slide 7

Slide 7 text

Render the Map • Python script to seed a tile cache – Declare Bounding Box, Zoom Scales, Source Map File, Output Directory – Creates a Z/X/Y File Structure – http://mkgeomatics.com/apps/bus/tiles/15/5239/11286.png • File structure can be accessed directly by display client – OpenLayers

Slide 8

Slide 8 text

Extending Mapnik • Quantumnik – Developed by Seattle based geo-developer Dane Springmeyer (dbsgeo.com) – Style the map in QGIS GUI – Generate the XML mapfile automatically – Can view mapfile live via console – Great tool to learn mapfile syntax

Slide 9

Slide 9 text

Extending Mapnik • Cascadenik – Developed by Stamen Design’s Michal Migurski – CSS Preprocessor • CSS is converted into an XML map file • Familiar to web designers

Slide 10

Slide 10 text

The Future • Better typography controls • New expression engine – Support filtering with Regular Expressions • Increase performance – Planned entry in FOSS4G WMS Shootout • Single File Map (SFM) – Create a map package with the data and styling to be viewable offline.

Slide 11

Slide 11 text

Learn More • Mapnik: mapnik.org • Quantumnik: http://bitbucket.org/springmeyer/quantumnik/wiki/Home • Cascadenik: http://mike.teczno.com/notes/cascadenik.html • E-mail: [email protected]