Chris Pollett > Students > Pundi Muralidharan

    Print View

    [Bio]

    [Blog]

    [CS 297 Proposal]

    [Deliverable 1 - WebGL Program: The Logic Behind]

    [Deliverable 2 - The Study of OSM Data and Vector Tiles]

    [Deliverable 3 - Importing OSM Data into Postgres Database]

    [Deliverable 4 - Study of Current Tile Generators in Trend]

    [CS 297 Report - PDF]

    [CS 298 Proposal]

    [CS 298 Report-Intermediate - PDF]

    [CS 298 - Summary of Intermediate Results - PDF]

    [The Project Idea]

    [The Map Query]

    [The WebGL Shaders]

    [The Final Map]

    [CS 298 Report - PDF]

    [CS 298 Presentation - PDF]

    [CS 298 Project Source Code - ZIP]

                          

























Deliverable 4 - Study of Current Tile Generators in Trend

In this deliverable, I have studied the existing tile generators and their nature of generating tiles. I have installed the following:

  • Python 2.7 - Mapnik runs on python. Python can be installed on a Mac by either macports or homebrew. On windows, download the python installer and install the same. Make sure to update the PATH variable with the location of python.
  • Mapnik - An open source toolkit for rendering maps. Available on Mac OS by initiating the following command: brew install mapnik. Make sure to update the PATH variable with the location of mapnik.
  • TileMill - TileMill is, as stated in their homepage, an interactive application for creating beautiful maps. It uses mapnik at its core to render the maps and uses very simple UI and CSS-like language to style them.
  • TileStache - TileStache is a Python-based server application that can serve up map tiles based on rendered geographic data.

I have used a Windows environment here. Installing mapnik creates a few demo tiles, which gives a clue that mapnik has been setup right. After installing TileStache, it is run using the "tilestache-server.py" script, inside the scripts folder as follows:

Tilestache server starting
Figure: Starting Tilestache server

The above implies that the server is running on localhost, on port 8080., as shown below:

Tilestache server running
Figure: Tilestache server running on localhost

Using the default tilestache server configuration file produces a world-tile as shown below:

Tilestache world tile
Figure: Default configuration produces world tile

Now, using TileMill, I have attemped to create a new project. I have downloaded the osm xml files for California from http://download.geofabrik.de/north-america/us/california.html and the shape files for California roads from http://scec.usc.edu/internships/useit/content/primary-and-secondary-california-roads. The shapefile format is a popular geospatial vector data format for geographic information system (GIS) software. I have tried to add a new layer and tried to import the shape files into the TileMill project created. Adding the shape files produces desired styling effects in TileMill. After this, I have used the 'Export' option in TileMill to export the shapefiles into the desired format. I have chosen MBTiles as the chosen format as this deliverable is intended for generating tiles. Further, I have used Cygwin on Windows to install github and mbutil, which is a command line tool to generate tiles.

Running the following command at the Cygwin prompt produces tiles for the shapefile imported in TileMill:

      $mb-util OSM-california.mbtiles OSM-california

The following screenshot shows the tile generated:

Tilemill Californian roads
Figure: Tile Generated using TileMill for Californian Roads

Upon investigating, I have concluded that using a CPU might take anywhere between 0.5 seconds to 2 minutes (tile generation for the whole world) using traditional tile generating methods. Using shader progams that run on GPUs will definitely accelerate the process of tile generation.