Mapnik: An Overview

Mapnik: An Overview

Presented to the Northwest Washington GIS User Group. June 18th, 2010. A high-level overview of Mapnik.

16c4c0d51c30a551af629301cf62ce62?s=128

Matthew Kenny

June 18, 2010
Tweet

Transcript

  1. Mapnik: An Overview June 18, 2010 – NWWaGIS

  2. 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
  3. Who is using it? • OpenStreetMap • Cloudmade • EveryBlock

    • Others
  4. How does it work?

  5. Styling • Multiple rules style a single feature • Features

    rendered in a ‘Painters Order’
  6. Styling • Mapfile can be large – OpenStreetMap XML: •

    6763 lines long • 30 Layers • 106 Styles • 628 Rules
  7. 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
  8. 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
  9. Extending Mapnik • Cascadenik – Developed by Stamen Design’s Michal

    Migurski – CSS Preprocessor • CSS is converted into an XML map file • Familiar to web designers
  10. 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.
  11. Learn More • Mapnik: mapnik.org • Quantumnik: http://bitbucket.org/springmeyer/quantumnik/wiki/Home • Cascadenik:

    http://mike.teczno.com/notes/cascadenik.html • E-mail: matt@ridolfi.com