Mapnik: The Coolest Mapping Software You’ve Never Heard Of

    by Ian Cairns
    October 29, 2010

    On the [MapBox website](http://mapbox.com/) we describe TileMill — the project we’re working on with our 2010 Knight News Challenge grant — as [“a toolkit for rendering map tiles”](http://mapbox.com/tools/tilemill). To be more specific, it’s essentially a “glue layer.” TileMill is built on top of a cocktail of other open source mapping software projects, and its biggest value is streamlining other more complex tools into a clean and easier workflow. For users to take advantage of TileMill, it can be useful to understand some of the underlying parts. Perhaps the most important part of that cocktail is a lesser known open source project called [Mapnik](http://mapnik.org/). In this post I’ll talk a little about what Mapnik is and the important role it plays in helping users style their maps, as well as how it relates to TileMill.

    The goal of the TileMill project is to make it easy for anyone with some basic web design familiarity to design their own custom maps. In past posts on this site we’ve introduced readers to [the general reasons why we think custom online maps are valuable](http://mediashift.org/idealab/2010/08/tilemill-custom-maps-to-help-with-data-dumps-hyper-local215.html) and have shared a [couple](http://mediashift.org/idealab/2010/08/helping-dc-drinkers-and-bikers-with-custom-maps230.html) [examples](http://mediashift.org/idealab/2010/09/open-data-custom-maps-better-afghan-election-monitoring259.html) for when custom maps have been particularly helpful on websites. Mapnik makes all this possible by providing the core technology to apply styles to GIS data and then render maps based on those styles.

    Here’s the basic idea with styling maps: raw GIS data in the form of shapefiles contains information about various “features” — for instance, place names, points (e.g. center of a city), lines (e.g. roads), or polygons (e.g. state or country borders). If you have the data in its raw form, you’re only part of the way toward turning it into a map. Next you need to decide how to style each element.


    Mapnik in action, styling maps of Kabul, Afghanistan
    Mapnik in action, styling maps of Kabul, Afghanistan

    The style of each feature (or lack thereof) is why maps of the same location might look different from others. At a simple level, you might want your primary roads to be red versus orange. Compare MapQuest to OpenStreetMap for instance, at the exact same zoom level — note the difference in the styles for the same features.

    Boulder, CO on MapQuest
    Screenshot of Boulder, CO on MapQuest


    Boulder, CO on OpenStreetMap
    Screenshot of Boulder, CO on OpenStreetMap

    Setting aside conversations about which features you decide to show on a map and assuming your data is accurate (both are huge factors), how you choose to style certain features might be the next most important part of map design. Getting styling right is essential for your users and is central to map design. If you [over style](http://www.41latitude.com/post/1241021075/google-maps-logo-icons) or [under style](http://www.41latitude.com/post/424913238/no-capital-cities) features, it has a direct impact on the readability and effectiveness of your maps.

    This is where Mapnik comes in — it provides the framework for styling map data and then rendering new maps based on those styles. Mapnik is an open source project that is heavily used by the team at [Cloudmade](http://cloudmade.com/), who are actively involved in custom styling of [OpenStreetMap](http://www.openstreetmap.org/) data, and it’s been used by MapQuest, who have even released their [Mapnik map style files for the public](http://devblog.mapquest.com/2010/07/16/mapquest-style-file-for-mapnik-open-sourced/). Our team uses it heavily too, and AJ Ashton and Tom MacWright from the MapBox team were recently in London at Cloudmade’s offices with a group of core contributors, including Mapnik’s creator Artem Pavlenko, for [the first ever Mapnik code sprint](http://developmentseed.org/blog/2010/sep/27/report-mapnik-code-sprint).

    But where professional mappers are able to leverage Mapnik in complex ways, it has its downsides for the average would-be map designer. For starters, it’s not easy for noobs to even install it. This is part of why we’re working on TileMill — we want to make it easier for people to take advantage of these powerful tools. TileMill puts a wrapper around Mapnik that makes it simple to set up and leverage the powerful map styling capacity that it provides.

    If you’re interested in more details about Mapnik, check out the [Mapnik website](http://mapnik.org) or a [recent Q&A with Mapnik developer Dane Springmeyer about Mapnik performance](http://developmentseed.org/blog/2010/oct/19/qa-mapnik-performance-just-important-its-beauty) on Development Seed’s blog.

    Tagged: GIS mapnik mapping open source openstreetmap shapefiles tilemill

    Comments are closed.

  • Who We Are

    MediaShift is the premier destination for insight and analysis at the intersection of media and technology. The MediaShift network includes MediaShift, EducationShift, MetricShift and Idea Lab, as well as workshops and weekend hackathons, email newsletters, a weekly podcast and a series of DigitalEd online trainings.

    About MediaShift »
    Contact us »
    Sponsor MediaShift »
    MediaShift Newsletters »

    Follow us on Social Media