[GIS] Generating GeoJSON tiles from GeoDjango – basic overview

geodjangogeojsontiles

I'm working with the glorious PolyMaps and I want to build a map similar to the population example.

I understand that this needs GeoJSON tiles. I have a GeoDjango database, with a bunch of County objects, each of which has a Polygon field – these are what I'd like to display on the map.

Can anyone give me a high-level overview of how to turn these County polygons into GeoJSON tiles?

I've seen this question recommending TileStache, but is TileStache the most sensible thing to use with GeoDjango? And if so, how would TileStache fit in?

Bonus points for explaining what a GeoJSON tile, um, is.

Thanks 🙂

Best Answer

I've made it work following this tutorial.

Edit :

One thing that might not be obvious in the link is that you need a get_config function that looks like this :

_config = TileStache.Config.buildConfiguration(my_config_dictionary)
def get_config():
    return _config

where my_config_dictionary is a TileStache config dictionary like in the TileStache's doc that makes the link with your database.