tangogps : updating tiles at home - tah.openstreetmap.org

Rask Ingemann Lambertsen ccc94453 at vip.cybercity.dk
Wed Aug 5 15:45:11 CEST 2009


On Mon, Aug 03, 2009 at 02:59:23PM +0200, Helge Hafting wrote:
> 
> http://wiki.openstreetmap.org/index.php/Tile_usage_policy

   It uses the words "draft policy" and "work-in-progress". With emphasis.

> tah.openstreetmap.org lets you download all you want,
> but it does not support md5sums so you cannot use yaouh.

   You say it as if those md5sums are a feature while in fact modification
dates are just as easy to work with and much more widely supported.
Fortunately, tah.openstreetmap.org supports If-Modified-Since: in requests
and reports Last-Modified: in responses. Tiles from tah.openstreetmap.org
can therefore be updated with your favourite HTTP mirroring tool. Example[1]
using wget:

$ cd /usr/local/share/maptiles/tah.openstreetmap.org
$ find Tiles -type f | \
wget -i - -B http://tah.openstreetmap.org/ -x -nH -N -nv

   This is the directory structure under tah.openstreetmap.org:

$ find Tiles -type f
[...]
Tiles/tile/9/273/160.png

   With tah.openstreetmap.org, you don't need yaouh! or similar tools.
Plusses to the people behind tah.openstreetmap.org for having a clue.

[1] I intended to simplify it to

$ cd /usr/local/share/maptiles
$ find tah.openstreetmap.org -type f | wget -i - -B http:// -x -N -nv

but there's a silly little bug in wget when using -i and -B together:

-: Invalid URL http:///tah.openstreetmap.org/Tiles/tile/9/273/160.png:
Invalid host name

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year



More information about the community mailing list