This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

List all missing metatiles for zoom level on tile server

0

I have a tile server based on tirex, postgres and mapnik. All metatiles are in /var/lib/tirex/tiles/. How can I get statistics on how many of the metatiles for a certain zoomlevel have been (pre)rendered, and how many are missing?

I use tirex-batch to prerender most tiles and want to make sure I do not miss any tiles accidentically.

asked 29 Apr '15, 14:12

jnachtigall's gravatar image

jnachtigall
101448
accept rate: 0%


One Answer:

2

If your use case is "find missing tiles, and pre-render them", then you can do

tirex-batch -f not-exists map=mymap bbox=-180,-90,180,90 z=0-12

or something like it; the -f not-exists only adds those tiles to the queue that don't already exist.

If you just want to know how many are missing, you can do a

for i in `seq 3 12`
do
   echo -n $i:
   find /my/tile/dir/$i -type f -name \*meta |wc -l 
done

You'd expect to see 4**(z-3) meta tiles on each zoom level fully rendered.

answered 29 Apr '15, 14:55

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .