Hi Guys, So before I start - I have done a lot of research into this, but I always seem to get stuck at the same issue. Firstly, the setup: Hardware: Xeon D-1520 - 32GB - Hybrid SoftRaid 2x2tb + 2x480GB SSD Software: Ubuntu Server 16.04 "Xenial Xerus" LTS The Problem: So - I've managed to get a OSM tile server running by importing europe.osm.pbf by following an article here: https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 Which got me as far as being able to render tiles and display them via a leaflet map, however, the problem is, that map is now out of date and i cant for the life of me figure out how to go about updating what is in the database currently. So, 2 questions
Please try to be as descriptive as possible as this is still a relatively new thing to me. Thanks. asked 26 Apr '18, 11:58 gaza1994 |
I'd suggest doing applying updates as described here for 16.04 (or here for 18.04). Those use the same software as the switch2osm guides for 16.04 and 18.04, which is mostly similar to the LinuxBabe notes, with some default user acount changes. Some repositories are using forked versions to avoid user typing and editing where possible. One thing to look out for - the forked version of answered 26 Apr '18, 12:30 SomeoneElse ♦ |
If you want a one-off update only, and not set up continuous updates, then you could also do the following:
While the update is running, you won't be able to generate tiles since the database is empty, but existing tiles will still display. If this is not acceptable to you, you could also import into a new database (say, "gis_new"), and when the import is complete, drop your old database and rename the new. If your disk space is not sufficient for two parallel databases, you can "drop table planet_osm_ways; drop table planet_osm_nodes; drop table planet_osm_rels;" on the old databases before you start, this will free over 50% of the disk space and make your old database still-working-but-un-updatable - not a problem since you plan to get rid of it anyway. answered 26 Apr '18, 13:02 Frederik Ramm ♦ 1
what would be a good method if i wanted to update often, say once a month?
(26 Apr '18, 14:48)
gaza1994
1
"Once a month" is about the worst thing that you can do because it's already too seldom for using the "diff" based updates (updating a database with all the diffs for one month will likely take more time than loading the whole thing anew) and at the same time a bit frequent for doing full data loads. But still I'd go for the full data load - should just about be doable over night on your platform.
(26 Apr '18, 15:04)
Frederik Ramm ♦
so basically, Load EU - render the tiles, then when updating, nuke the database, re-import EU and force a re-render of all the tiles?
(26 Apr '18, 17:07)
gaza1994
|
Just out of interest, how long did it take to do an "initial load" of Europe on that hardware?
around 3-4 days (ish)
I was worried about that - that's going to rule out "overnight updates" then, I think. "diff" based updates should be possible, but you'll want to start with an up to date server, though.
starting fresh isnt an issue!
Is there a good guide on how the "diff updates" work and how it could be scheduled to do it?
I don't know of a good "how they work" guide but this section should tell you what you need to do.
I guess that there ought to be a page at switch2osm.org about it, but no-one has written that yet. Feel free to volunteer :)