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

How to update the changed tiles?

0

I have installed the rails port and tile server, if i make an edit at my local map, and use osmosis command to keep the tile server database consistent with the rails port database, then how can i update the tiles that has been edited? Each time i want to see the changes, i have to clear up the cookies on the website and remove the /var/lib/mod_tile/default directory in the vm, then re-run the renderd command. But this method can't be the proper solution, so what is the correct way to update the changed tiles?

asked 13 Sep '16, 07:38

yuyy's gravatar image

yuyy
236222431
accept rate: 20%


One Answer:

2

If you're using mod_tile then there's a script that comes with that that calls osmosis to update a rendering database based on "minutely diffs" and also expires tiles based on those updates. You'll need to have a look at that to see what needs to be changed so that it expires tiles based on your own changes. The one that comes with mod_tile initialises replication to look here by default (the file /var/lib/mod_tile/.osmosis/configuration.txt is created when you initialise replication).

answered 13 Sep '16, 08:55

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

(13 Sep '16, 09:47) SomeoneElse ♦
1

I think the main command that used to updata tiles are "$OSM2PGSQL_BIN -a --slim -e$EXPIRY_METAZOOM:$EXPIRY_METAZOOM $OSM2PGSQL_OPTIONS -o "$EXPIRY_FILE.$$" $CHANGE_FILE" and "render_expired --min-zoom=$EXPIRY_MINZOOM --max-zoom=$EXPIRY_MAXZOOM --touch-from=$EXPIRY_MINZOOM -s /var/run/renderd.sock", am i right?

(13 Sep '16, 11:09) yuyy

Yes - and obviously $CHANGE_FILE is the list of changes that you'll need to create somehow.

(13 Sep '16, 11:11) SomeoneElse ♦
1

I know that, "osmosis --read-replication-interval workingDirectory=replication --simplify-change --write-xml-change changes.osc.gz" command can create the changes file.

(13 Sep '16, 11:15) yuyy

Source code available on GitHub .