04.16.2011 

TileMill

The folks over at Development Seed have been building awesome open source tools for mapping and GIS for a couple of years now. Their bread and butter products are really their Drupal tools and extensions, but the stuff I get the most out of, personally, are the mapping toolkits produced under the Mapbox brand: Maps on a Stick, MBTiles, and of particular note, TileMill.

If you’ve ever explored how Google Maps is put together, you’ll have noticed that it combines a Javascript map viewer (the “slippy map”) with static PNG image files it serves up to the browser as you slide around on the map. Creating tiles from GIS vector data — be it street lines, boundaries, lake polygons, or points representing cities — is a challenging task, but a surmountable one with the toolsets developed and nurtured by the OpenStreetMap community over the last few years. Mapnik (the renderer ultimately responsible for the pretty tile images) is fantastic for distilling vector and raster data into images — the downside being the learning curve to putting together style templates to define the layers, colors, line styles, and label typefaces for your maps, not to mention the difficulty of configuring the software and tweaking its performance.

This is where TileMill comes in to save your bacon.

Cartography made easy(er)

Trying to design Mapnik XML style templates by hand is totally insane. Especially for a cartographer-type just trying to make good looking graphics. Catch this snippet of the raw Mapnik style it parses to build the tiles:

Yuck. Logical, yet totally overkill for someone just trying to “make that highway dark blue.”

Full of nasty tag duplication and anti-DRY machine language. Editing this stuff is made better by using Michal Migurski’s cascadenik, a CSS preprocessor that turns a CSS-like language into that XML format, but it’s still tedious. You have to make your changes, run a tile server somewhere, setup an OpenLayers viewer, and wait for it to re-render your samples each time you iterate style changes.

TileMill combines all these tools into a map design suite. Extremely easy to use (with a rudimentary knowledge of CSS and spatial data formats), and so fast. Much faster than I ever had Mapnik and Postgres working together for rendering OSM data.

They’ve stitched together an array of open source components to build an incredibly useful tool for putting together great-looking interactive maps. I’ve even been using it as a replacement for making static map graphics; what used to be fodder for the very-frustrating-to-use ArcGIS Desktop. I essentially have no need of ArcGIS for data display, it’s only got the handcuffs on me for analysis work (but this is quickly disappearing day-by-day, too).

Smart storage formats

Another huge complementary feature/tool is the MBTiles format for exporting tilesets. I can build a map quickly, export the zoom levels I want to MBTiles, and view them in OpenLayers on a webpage. All tile images are encapsulated in a compressed SQLite database, so therefore very interoperable. Our iPhone “geo data app”, Maptual, now has support for viewing MBTiles datasets (but it’s not yet on the App Store). So this is fantastic for developing gorgeous, offline maps that can be used on iOS.

You can also read in GeoJSON, KML, and GeoTIFFs — smarter formats that I hope start to trump things like shapefiles and coverages in the future.

Hats off to the Dev Seed guys (and others) for building a great tool for us geographers. Stuff like this is making our jobs more interesting every day.

 02.13.2010   11.14.2009   09.12.2007 

A1c0r in action with Quicksilver.

Impression theme by Hello New York.