Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mapnik: An Overview

Mapnik: An Overview

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

Matthew Kenny

June 18, 2010
Tweet

More Decks by Matthew Kenny

Other Decks in Programming

Transcript

  1. 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
  2. Styling • Mapfile can be large – OpenStreetMap XML: •

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

    Migurski – CSS Preprocessor • CSS is converted into an XML map file • Familiar to web designers
  6. 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.