spacing parameter with vector layer

55 views
Skip to first unread message

b_b

unread,
Apr 23, 2012, 11:19:49 AM4/23/12
to tiles...@googlegroups.com
Hi and thank you for TileStache, this tool rocks.

I'm new here and i'm playing with TileStache since last week. I've managed to install it with the help of this tutorial :

http://www.axismaps.com/blog/2012/01/dont-panic-an-absolute-beginners-guide-to-building-a-map-server/

I've made a french tranlsation of it and bring some small fix, i will publish it on my blog in the coming days. My draft is there for the moment :

http://labo.eliaz.fr/spip.php?article96

I have a question about the spacing parameter when displaying vector layer feeded with a json file. i've got a demo online here :

http://92.243.26.168/polymaps/examples/geodiv/

This demo will be acessible until the 04/28 (it is hosted on free virtual server for now, i will put this on my dedicated server after that). My json file is there :

http://92.243.26.168/geodiv.json

And here is my Tilestache config file :

https://gist.github.com/2471555

Does the spacing option work for geojson source ? Does this functionnaliity needs some specials libs to be enabled on the server ? Is there something wrong in my json file or in my config file ?

Thanks for your help ++

b_b

unread,
May 10, 2012, 10:02:40 AM5/10/12
to tiles...@googlegroups.com
Hi, does anyone can give me a clue to know how i can log to debug this problem please ?

I've tried python loging bug this dont seem to work when i try to log infos form TileStache/Vector/__init__.py

Thanks in advance for help

alalonde

unread,
May 10, 2012, 11:31:42 AM5/10/12
to Tilestache
Make sure you use the --include-path option to use the local version,
otherwise it'll execute the installed version.

E.g. ./scripts/tilestache-server.py --include-path=.

b_b

unread,
May 10, 2012, 3:05:23 PM5/10/12
to tiles...@googlegroups.com
Thanks for this info, i've managed to log what happened and found my mistake :)

I was using this in my config file :

        "geodiv":
        {
            "provider": {"name": "vector", "driver": "GeoJSON", "parameters": {"file": "geodiv.json"}},
            "preview": {"lat": "48", "lon": "-4", "zoom": "7", "ext": "geojson"},
            "projection": "spherical mercator",
            "allowed origin": "*",
            "spacing": "16"
        },

Instead of using the right syntax :

        "geodiv":
        {
            "provider": {"name": "vector", "driver": "GeoJSON", "parameters": {"file": "geodiv.json"}, "spacing": "16"},
            "preview": {"lat": "48", "lon": "-4", "zoom": "7", "ext": "geojson"},
            "projection": "spherical mercator",
            "allowed origin": "*"
        },

The spacing parameter had to be in the provider part of arguments, problem solved.

Anyway, the tutorial i was talking about in my first post here is now online here :

http://www.weblog.eliaz.fr/article115.html

Next incoming tutorial will explain how to use vector tiles and GeoJSON.

Thanks again ++
Reply all
Reply to author
Forward
0 new messages