I just completed a project I’ve been working on for a few weeks, a vector tile map of American rivers based on the NHDPlus dataset. It’s mostly a demo project with readable source, but it’s also kind of pretty.

There are three and a half products:

  1. Web maps you can view in your browser. I made versions with Polymaps, Leaflet, and D3 (cribbing code from Mike Bostock). Jason Davies has an amazing Albers projection version and Ziggy Jonsson did a D3/Leaflet hybrid.
  2. A GeoJSON vector tile server. It’s at http://somebits.com:8001/rivers/{z}/{x}/{y}.json You’re welcome to use it for light projects and demos, but it is not provisioned for heavy use.
  3. A thoroughly documented tutorial on building a vector tile server. This is the real product, my goal was to learn about doing vector tiles in open source and share it with others. With this code it should be pretty easy for anyone to duplicate my map and adapt it to their own data.
  4. Raster renders of every single river. It’s too much data to serve as a vector tile map, but it sure is pretty.

Vector maps are exciting. The proprietary map world is moving steadily towards vectors; pretty much all mobile maps are vector now and Google Maps is switching to vectors on the desktop. The open source and data world is getting there too. Thanks to Mike Migurski there’s now an experimental OpenStreetMap vector service that’s very promising. Also my personal thanks to Mike: the genesis of this project was getting an hour of his time.

tech
  2013-05-21 19:48 Z