I am creating my own tile server for OSM using Windows Server 2003. Since I am using Windows 2003, I can not use mod_tile. Here is my stack so far:
I am currently serving up tiles from a folder on my server using the OpenLayers.Layer.OSM class, i.e. I am not using TileCache or anything else.
I see you can you use the --expire-tiles option within osm2pgsql to create a list of expired tiles after you append new OSM data into the DB. asked 21 Sep '10, 15:47 maw269 Frederik Ramm ♦ |
First of all, you have to understand that this is not a high performance setup and that you will not be able to keep a current set of tiles for anything larger than a small country with this. With no on-demand tile rendering you will always struggle to keep every single tile current, spending lots of CPU cycles for nothing. You are probably using generate-tiles.py from the OSM Mapnik SVN. There is a function in there that calculates a single tile. With a little bit of Python you should be able to adapt the script to actually read the file generated by osm2pgsql and call the tile compute routine for each tile in that file. I am not aware of a ready-made solution for that in a renderd setup you could use render_expired but you'll have to do it that way. You can request osm2pgsql to output a list of modified tiles for a whole range of zoom levels. Be aware that if you include small zoom levels then the tiles on these zoom levels will be rendered very often; you might want to employ some grep/sort magic and re-render those only once every few days. All in all, the mechanisms involved are complex and PostGIS caching performance is less if you render a flurry of new tiles across a large area compared to systematically rendering all tiles. You might find that with the rather small area you're able to cover with your setup anyway, it might be easier and not even slower to just re-render the whole lot once in a while rather than trying to process updates. answered 21 Sep '10, 19:31 Frederik Ramm ♦ |
May I ask where mod_tile fails on windows? Given that it is a apache module, it should be crossplatform capable. I don't know of anyone who has tried it though, so it might well need some tweeks to get it to build.