Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear all osm tiles cache on my own server

I'm currently working on a map project, based on OpenStreetMap, using Mapnik, renderd and mod_tile (like osm do on their website). I've built an osm tiles server, following some tutorials, on my personal computer (Ubuntu 12.04). It works well, and i've loaded a lot of regions of one country (not the entire planet, just some piece of the planet).

I realized that mod_tile was using a cache for each tiles rendered, so i decided to investigate how i can clear that. The only solution i found so far was to use the render_expired binary, but i don't understand how i can set all tiles to expired by this way (moreover without diff files)... I was trying to find where these images are located but i don't find them.

I need some help, so if someone has an idea ...

like image 802
GeoffreyB Avatar asked Sep 05 '12 15:09

GeoffreyB


2 Answers

Just remove the mentioned /var/lib/mod_tile/default (using rm -rf if you dare) and restart renderd daemon.

like image 57
baol Avatar answered Oct 01 '22 16:10

baol


Run this:

sudo rm -rf /var/lib/mod_tile/ajt
sudo service renderd restart

ajt is your tile folder which may be different and there may be more than one.

If you accidentally removed your ajt (or any other) folder itself:

sudo mkdir /var/lib/mod_tile/ajt
sudo chown renderaccount /var/lib/mod_tile/ajt
like image 31
Ismail Yavuz Avatar answered Oct 01 '22 16:10

Ismail Yavuz