I am working with this select area of US map(.pbf file) which is like year old and I am interested to keep it up to date at least weekly.
I know that there are change sets that are kind of published regularly on OSM site but they seem to be of entire planet. Is there any way I can use such change sets to only update my .osm file?
FYI: I am aware of osmosis’s --Apply-change command that applies .osc to a .pbf/.osm file.
With each .osc that you download, use “trim_osc.py” from Zverik’s “regional” scripts on it. There’s a bit of discussion about that at
https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1604_tileserver_load#Updating_your_database_as_people_edit_OpenStreetMap . That page describes changes to openstreetmap-tiles-update-expire to keep a rendering database up to date, but you could also use “trim_osc.py” with similar parameters to try a .osc prior to updating a .pbf.
I used several times script that uses osmconvert as the first step to make a garmin map.
It updates a o5m file using osc files (from replication/day) and a poly boundary.
The osmconvert options used are “–complete-ways --complex-ways --drop-broken-refs” and --merge-versions
The script is GPLv3 licensed here https://proyectos.ingeniovirtual.com.ar/projects/garmin-osm/repository/revisions/master/entry/bin/02_getosmdata.sh
there is a program called “osmupdate”:
To save time and to save download traffic you also could use regional “change files” (.osc), e.g. that files from geofabrik.de:
The resulting command line might look like this:
osmupdate old.pbf new.pbf --base-url=download.geofabrik.de/europe/germany/north-america-updates
This would include Canada as well but you could apply a US bounding box at the same time: -B=us-boundings.poly