One of our favorite collaborative open data projects is [OpenStreetMap](http://www.openstreetmap.org). We’ve [talked before](http://mediashift.org/idealab/2010/10/openstreetmaps-audacious-goal-free-open-map-of-the-world288.html) about the project’s goals, how its free and open nature is advantageous for non-profit and commercial applications alike, and how its open and near-real-time editing process is a major [advantage in rapidly changing situations](http://mediashift.org/idealab/2010/12/how-openstreetmap-helps-to-curb-haitis-cholera-epidemic342.html), from city construction projects to natural disasters. The map’s coverage continues to grow and become increasingly accurate and complete as more people discover it and contribute.
The project’s main feature is not the interactive “slippy map,” but the thousands of other possibilities the underlying data provides. Since OpenStreetMap is open and freely available, many niche spinoffs highlight specific areas of interest, like good [bicycle routes](http://www.opencyclemap.org/), details important to [sailing and marine navigation](http://www.openseamap.org/), and information about [wheelchair accessibility](http://wheelmap.org/). OpenStreetMap is an excellent resource of data for creating custom maps with [TileMill](http://tilemill.com/), our open-source map design studio which [we’ve written about here before](http://mediashift.org/idealab/2011/03/telling-better-stories-by-designing-custom-maps-using-tilemill059.html).
![Bike paths and schools in Portland](http://farm4.static.flickr.com/3170/5862912391_8998fae67b.jpg)
Above is a custom map created in TileMill using data from OpenStreetMap. It pulls information about bike paths out of the OpenStreetMap database and highlights them with pink lines. The map also shows schools, which are the purple dots. Instead of cluttering the map with labels, we’re using TileMill’s interactivity feature in this example to show school names when the mouse cursor hovers over them.
- Getting Data
With so much information in the OpenStreetMap database, working with all of it at once can be a challenge requiring a lot of time and hardware. But often, you will only need data for a particular region, and in these cases there are simpler options than cloning the full database. [CloudMade](http://cloudmade.com/) and [Geofabrik](http://www.geofabrik.de/) are two companies that provide extracts of the OSM database that are broken up into more manageable chunks based on countries, states and provinces. The data is available in a variety of formats suited for different needs, many of which work well in TileMill. (Browse CloudMade’s files at
Some of the data extracts can be easily imported into a [PostGIS](http://postgis.refractions.net/) database, which [recent versions of TileMill can connect to](http://developmentseed.org/blog/2011/may/26/announcing-postgis-support-tilemill). PostGIS is an extension for PostgreSQL databases that provides features for working with geographic data, and is used to power the maps for OpenStreetMap.org, [open.MapQuest.com](http://open.mapquest.com/), and many other online maps.
![TileMill editing a PostGIS layer](http://farm6.static.flickr.com/5117/5863463866_448a586c7a.jpg)
TileMill editing a PostGIS layer
For those less familiar with working with spatial databases, shapefiles are probably the simpler route. TileMill comes with an [example road map](http://developmentseed.org/blog/2011/jun/01/open-streets-dc-showing-what-tilemill-can-do-street-level) project that uses shapefiles from CloudMade. The actual shapefiles it uses cover just Washington, D.C. However, because all the shapefiles from CloudMade use the same data table layout, it’s possible to apply the same style sheet to any area they have shape files for. With a few small tweaks, the same style could also be used with OpenStreetMap shapefiles from Geofabrik.
Whichever route you take, hopefully TileMill will make working with open geographic data sources such as OpenStreetMap easy and flexible, and encourage creative results.
You can download TileMill at [TileMill.com](http://tilemill.com/) and find support documentation for how to use it to create online, interactive, custom maps at [support.mapbox.com](http://support.mapbox.com/).