TileCache setup

239 views
Skip to first unread message

Keith Bornhorst

unread,
Mar 22, 2013, 4:14:36 PM3/22/13
to opentree...@googlegroups.com
Late request on a Friday... Maybe I'll be able to answer this myself by the end of the weekend, but figured I'd see if anyone can point me in the right direction.

Environment:
- Ubuntu 12.04
- OTM v1.3 + Philly dirs/files from OTM-master
- Apache2, PostgreSQL, GeoServer all up and running on same machine

Status:
- sync'ed, migrated, one zipcode, one neighborhood, zero trees (still working on those)
- map loads, but no tiles

Regardless of the lack of trees, I'd like to get TileCache up and running. GeoServer comes with plenty of layers/services that I can test with, methinks.

The problem is that I'm new to Ubuntu and there appears to be different ways to run TileCache (CGI, mod_python, standalone WSGI, FastCGI, etc.

What's the most common configuration people are using for OTM + TileCache?

  • The machine has TileCache installed (sudo pip install TileCache) at /usr/lib/pymodules/python2.7/TileCache/
  • I see the /OpenTreeMap/tilecache/tilecache.cfg file and have edited it a bit
  • I've updated the apache2 config file for the site (/etc/apache2/sites-available/default)
    •  <Directory /home/myuserdirectory/www/opentreemap/tilecache>
    • AddHandler cgi-script .cgi
    • Options +ExecCGI
    • </Directory>
I'm obviously missing something small (another config file? another alias or symbolic link? Maybe it's erroring and I just don't know where to look?) or maybe something really big. Any thoughts on what of the above areas or causing the issue?

Thanks,
Keith

Keith Bornhorst

unread,
Mar 22, 2013, 4:20:57 PM3/22/13
to opentree...@googlegroups.com
Forgot to mention that the /OpenTreeMap/tilecache/ directory has a config file, but no .py or .cgi (tilecache.py, tilecache.cgi) files that I sometimes see mentioned. Not sure if I missed an install step, need to link those in from somewhere else, or what....

Thanks again,
Keith

Bob Troester

unread,
Mar 22, 2013, 8:11:28 PM3/22/13
to opentree...@googlegroups.com
Keith,

I had set up my TileCache a little differently, but it seems to be working. One thing, the file in your OpenStreeMap/tilecache directory is a version of the tilecache.cfg file that the TileCache install puts in /etc/tilecache.cfg. Since I'm confused as to which of these two files TileCache is actually using in our OpenTreeMap configurations, I've temporarily made them both the same. For CGI I use the default directory for Ubuntu of /usr/lib/cgi-bin. In there I put a link pointing to /usr/local/bin/tilecache.cgi. (See the other tilecache commands installed in that directory.) I use cgi instead of fcgi or other flavor just because it's simpler, since Apache, as installed, was all set up for cgi.This is all explained in the TileCache docs (http://tilecache.org/docs/README.html). I think a good idea is to add the "[basic]" configuration in tilecache.cfg
[basic]
type=WMS
url=http://labs.metacarta.com/wms/vmap0
extension=png

Then you can quickly check it works by entering localhost/cgi-bin/tilecache.cgi/1.0.0/basic/0/0/0.png in your browser to see a neat half-world map.
Bob

Keith Bornhorst

unread,
Mar 26, 2013, 11:09:55 AM3/26/13
to opentree...@googlegroups.com
I appreciate the detailed help, Bob. My tilecache install/config is now serving up a half-world map for [basic]!

It looks like many OTM implementation create a Layer Group to display neighborhood boundaries, plots and trees and then have TileCache process that layer.


I'll start trying to set up something similar to the above and get TileCache to process it.
Reply all
Reply to author
Forward
0 new messages