Modifying cfg in script

83 views
Skip to first unread message

Max Demars

unread,
May 14, 2013, 8:51:57 PM5/14/13
to tiles...@googlegroups.com
Hi!

I am a new user of TileStache. I was using mapnik python binding in my geodjango application before and now I would like to use the capabilities of TileStache. After installing TileStache and running the demo, I would like to bind the library in my application.

I want to use PostGeoJSON.Provider to create tiles from queries on a postgis table. As the queries and rendering options would be determined by the app's user, how to modify the tileStache.cfg from a python script to pass all the  variable?


What would be the best way to achieve that?

Thank you for your help,

Max Demars

Michal Migurski

unread,
May 15, 2013, 1:33:57 AM5/15/13
to tiles...@googlegroups.com
Hi Max,
It sounds like you want to create a dynamic configuration, is that right? One that is different for different users depending on some external factors?

The TileStache configuration object must conform to this description:
http://tilestache.org/doc/#custom-configuration

But you have quite a bit of leeway to create a custom behavior within that. For example, we have a dynamic configuration client in the goodies package that may be a model for you:
http://tilestache.org/doc/TileStache.Goodies.ExternalConfigServer.html

-mike.

----------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html




Max Demars

unread,
May 17, 2013, 6:38:56 PM5/17/13
to tiles...@googlegroups.com
Thank you for your answer Mike.

I wonder now if its possible to use mapnik.Map python object instead of mapnik.xml with TileStache mapnik provider?

Max Demars



Reply all
Reply to author
Forward
0 new messages