What's the process for creating GeoJSON 'tiles' for use in Polymaps?

The Population example over at polymaps.org notes that the data for the demo runs on Google AppEngine, and alludes to "rolling your own" vector tiles, but I can't seem to find any more information.

4 Answers 4


TileStache will definitely do it, specifically the PostGeoJSON provider in the extra providers collection. The main difference between this and what we did for the Polymaps examples is polygon clipping - after seeing how large Alaska can get at higher zoom levels, we clipped all the features in the Polymaps examples to cut down on load times and so on. We also hosted them out of AppSpot to make it possible to add the Access-Control-Allow-Origin header for cross-domain permissions.

PostGeoJSON doesn't clip out of the box, but as it says in the docs I'd be happy to develop the code further if there's interest!

Update: It appears that as of Tilestache 1.9.0 the Vector Provider appears to be favored over the PostGeoJSON Provider.


I've definitely wondered about this myself as it's something I want to make use of in Tile5 (http://tile5.org/) also. I've seen Mike Bostock (who worked with Stamen to produce Polymaps) respond via Twitter on the topic before and here is the link:


Would definitely like to find a nice standalone solution to the problem. A couple of products that look like steps in the right direction are:


You could use ogr2ogr to create a static GeoJSON file for serving, but it appears that for the time being you do have to write your own web services if you want to enable clipping or any of the other dynamic URL functions (zoom level, etc), and I'm not aware of any tiling tool that would create a tile cache of a data set, but again that could be fairly easily done with a batch process and ogr2ogr's various -clip* options. Though for vector data this doesn't seem to make sense because it'd cut polygons into pieces per tile when they overlap, you'd probably be better off with a bounding box search.


There does seem to be a gap to fill here. A nice stand alone json tile cutter would be great to have (& good for those who aren't using tilestache). Check out the python module Bloch (via M. Migurski): https://github.com/migurski/Bloch (think mapshaper.org on the command line & python).

As Jason pointed out the process of tiling data is rather straightforward and could be accomplished pretty quickly by using something like gdal2tiles as a starting point and morphing it into the vector world.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.