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

Updating OSM local database after a regular interval

0

I have setup a local version of OSM database using osm2pgsql in slim mode. Now I have the following tables

planet_osm_lines

planet_osm_nodes

planet_osm_point

planter_osm_roads

planet_osm_ways

I used the following command to migrate the database

osm2pgsql -c -d DATABASE_NAME --slim planet.osm.pbf

Every thing is working fine. now I want to update these regularly and stay up to date with latest changes.

-- Since I am using rails is there a way to update these tables programatically? I mean I can run a schedulized job and it will update it with latest changes without having to download entire osm files?

-- Secondly since I am only interested in US, Canada and Mexico is there a way to fetch only these countries data?

Thanks

asked 25 Jul '17, 16:33

aitizazk's gravatar image

aitizazk
217710
accept rate: 0%


One Answer:

1

If you've got a rendering server (which I'm assuming that you have) and are using mod_tile (which you may not be) then this wiki page might be useful. Even if you're not then you should be able to adapt the link to Zverik's "regional" scripts from there to cut down the updates that you apply to only North America.

answered 25 Jul '17, 16:48

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .