Tyler is an OpenStreetMap Tileserver. This project is mostly for me to wrap my head around programming in C. I wanted something big enough to be a challenge, but with a clear enough scope to not feel overwhelming.

So far, there is a module to read .osm xml files, and return a set of nodes with associated latitudes and longitudes. You can filter a file by tag keys and values, and get a bounding box of the resulting nodesets. There is a function to render nodes within a bounding box, Functions to convert latitude and longitude to spherical mercator projection, and an FCGI server that serves the files associated with a given zoom level and x/y index.


Tyler depends on the following external libraries. In order to build it, you will need the development headers for them.

  • libgeos
  • imlib2
  • libfcgi
  • libxml2

Once you have them all installed, all you need to do is:

$ make

This will build the whole thing. Currently there is no install target, and no configure script.

Getting Data

To download data, go into the data dir and run

$ sh download.sh

This will download data for a few small New England states. For larger datasets there is also a download-medium.sh and a download-large.sh file

Running the FCGI server

First, configure nginx to proxy for FCGI with a configuration like the following:

include /etc/nginx/fastcgi_params;

server {
    listen 80;
    server_name _;

    location / {

Then run:

$ spawn-fcgi -fcgi -a127.0.0.1 -p 9000 -n ./fcgi_test data/connecticut-latest.osm

using whatever dataset you like.

Viewing the map

Once you have the fcgi server running and being served by nginx, you can view the map using the demo page at ./demo.html. It should work in the browser of your choice.

A demo of the map as rendered by changeset 7711e3d1c689 can be seen here: http://imgur.com/a/CDnHp



  • Support multiple filters (ORed together)
  • Handle ways and relations properly.
  • Provide a web service for requesting tiles.
  • Implement a more efficient backend, so we don't have to keep all tiles in memory (sqlite or postgres).


  • Support multiple input formats.
  • Support multiple output formats
  • Allow custom styling of results.

(c) 2014 J. Clifford Dyer, All rights reserved, until I figure out how I want to open source this project.