0

I have a need for an ever evolving tilestache.cfg file. I would like to be able to load this from an external source. Is it possible to run a Tilestache server with

tilestache-server.py -c http://s3.amazonaws.com/*myBucket*/tilestache.cfg

or even with

`gunicorn --workers 4 "TileStache:WSGITileServer('http://s3.amazonaws.com/myBucket/tilestache.cfg')"

Or am I completely off base here?

0

So after learning a lot about TileStache in last several days I found this tidbit sitting in the Config.py file:

Although a configuration file can be parsed from a remote URL, some paths (e.g. the location of a disk cache) must be local to the server. In cases where we mix a remote configuration location with a local cache location, e.g. "http://example.com/tilestache.cfg", the disk path must include the "file://" prefix instead of an ambiguous absolute path such as "/tmp/tilestache".

Interesting, so it appears that yes, one can very well use a tilestach.cfg file sitting in S3 (or anywhere else that is web accessible) BUT you must include the file:// prefix in the cache: settings in the tilestache.cfg file.

So the following will not work:

{    
    "cache": {
        "name": "Test",
        "path": "/tmp/tiles",
        "umask": "0000"
    },
    "layers": {...}
}

While the following did work for me:

{
    "cache": {
        "name": "Test",
        "path": "file:///tmp/stache",
        "umask": "0000"
    },
    "layers": {...}
}

Also I learned the mod_python is dead, which is a shame as it was awesome when it came to re-reading the tilestach.cfg file every time the http://webserver/tile/tile.py/layer/z/x.png urls are requested. This was fantastic for our clients ever changing maps. But with TileStache running via a WSGI and mod_wsgi all it takes is to run a 'touch' command on the .wsgi file to force Tilestache to re-read its tilestach.cfg.

Now if I can only figure out how to get this tile server to run inside an aws auto scaling group I might be able to meet our clients' demands . . .

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.