[Tile-serving] Recommended OSM update method?

Andy Townsend ajt1047 at gmail.com
Fri Apr 15 23:45:47 UTC 2022


On 15/04/2022 21:07, Lynn W. Deffenbaugh (Mr) wrote:
> Crickets... https://www.wordnik.com/words/crickets

What?  After 24 hours! I'm sorry that everyone on this list can't meet 
your exacting schedule :)


>
> On 4/14/2022 3:05 PM, Lynn W. Deffenbaugh (Mr) wrote:
>> Greetings fellow tile servers,
>>
>> I've just about finished (re)setting up my planet-wide tile server 
>> for the umpteenth time and was wondering what is the current 
>> recommendation for keeping the OSM database current. There are two 
>> different approaches that I've found documented, and I've used both 
>> of them in the past.  But for this newest server, I'd like to follow 
>> the best practice recommended by the community.
>>
>> Using mod_tile's openstreetmap-tiles-update-expire from
>>
>> https://switch2osm.org/serving-tiles/updating-as-people-edit/
>>
>> or use osm2pgsql's osm2pgsql-replication from
>>
>> https://osm2pgsql.org/doc/manual.html#updating-an-existing-database
>>
>> For a bit of background, I don't need minutely updates, but update in 
>> batches approximately monthly using the daily planetary diffs. After 
>> updating, I re-render all existing tiles that have been affected by 
>> the updates (expired) and then snapshot the end resulting individual 
>> PNGs (extracted from the metatiles directly) to another storage 
>> platform.
>>
I can comment on the first of those (since I wrote it).  It was written 
using mod_tile's expiry scripts (that have existed since Noah was in 
short trousers) because at the time that I wrote the set of instructions 
that that page was based on, osm2pgsql didn't even _have_ a manual, let 
alone documentation for osm2pgsql-replication et al.  When I last looked 
at updating it (OCtober last year), the required version of osm2pgsql 
(1.4.2) wasn't generally distributed in the distributions that those 
instructions target:

https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=osm2pgsql 


https://packages.debian.org/search?suite=all&searchon=names&keywords=osm2pgsql

(although that issue goes away after the next Ubuntu LTS release is in 
about 5 days time)

Of the two approaches, if you've used both in the past and are happy 
with either then pick whichever one works for you.  If the latest 
osm2pgsql is available to you then 
https://osm2pgsql.org/doc/manual.html#updating-an-existing-database uses 
a set of tools from one source; for example you don't have to install 
Java only to support osmosis for this one job and no other.  The last 
time I looked in any detail the "soup to nuts" documentation for the 
process wasn't quite there, but it looks like it's been significantly 
updated since I last looked.

Best Regards,

Andy






More information about the Tile-serving mailing list