Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to set up TileStache, but I'm new enough to the world of GIS to find the TileStache docs a bit impenetrable.

I've just about figured out that I need to run

tilestache-server.py -c tilestache.cfg 

to start TileStache, and navigate to http://127.0.0.1:8080/ to see the results.

However, I'm unclear on what to put in tilestache.cfg.

Eventually I want to use GeoJSON, generated from a PostGIS database, but for now I'd just like to start with a simple example to make sure that TileStache is working.

There is a 'minimal sample configuration' in the docs, but it seems to rely on Mapnik - and refers to a style.xml file - do I need to install and configure Mapnik before I can use TileStache?

* UPDATE *

Okay, I've tried using a 'proxy' config as follows in tilestache.cfg:

{
  "cache":  {"name": "Test"},
  "layers":
  {
    "roads":
    {
      "provider":
      {
        "name": "proxy", 
        "url": "http://tile.openstreetmap.org/{Z}/{X}/{Y}.png"
      }
    }
  }
}

And then restarting Tilestache and going to http://127.0.0.1:8080/, but I still see:

Bad path: "/". I was expecting something more like "/example/0/0/0.png"

If I go to http://127.0.0.1:8080/example/0/0/0.png then I get a 404 - any ideas?

* UPDATE 2 *

For the benefit of others: roads should be part of the URL, so visit http://127.0.0.1:8080/roads/0/0/0.png or http://127.0.0.1:8080/roads/preview.html to see tiles!

share|improve this question
    
That right... nice one! –  Sid NoParrots Aug 2 '12 at 13:25

1 Answer 1

up vote 2 down vote accepted

From browsing the documentation, it looks like Mapnik is just one of the possible providers. For your simple test, you could try the Proxy provider example (in the Providers section) which pulls and caches tiles from OpenStreetMap.

For your final goal, it looks like you'll want to use the Vector provider with your GeoJSON data.

share|improve this answer
    
thanks - I've tried with the Proxy provider (see update), but still no luck. –  Richard Aug 10 '11 at 20:55
    
Ah okay figured it out - roads should be part of the URL - 127.0.0.1:8080/roads/preview.html works. Thanks. –  Richard Aug 10 '11 at 21:06
    
Cool, good to know. Glad to see you got something working! –  mrohlf Aug 11 '11 at 15:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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