Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Migrate the update to use plant extracts #5

Open
HarelM opened this issue Oct 25, 2021 · 4 comments
Open

Migrate the update to use plant extracts #5

HarelM opened this issue Oct 25, 2021 · 4 comments

Comments

@HarelM
Copy link
Member

HarelM commented Oct 25, 2021

Due to the extract delays that sometime occur in the French minutely extracts we would like to consider migrating to a more robust mechanism using the planet extracts and some extra processing.

@HarelM
Copy link
Member Author

HarelM commented Oct 25, 2021

The following is a partial code related to the creating of the change files:

[ ! -f data/changes.osc.gz ] || rm data/changes.osc.gz

pyosmium-get-changes --server https://planet.osm.org/replication/minute -f data/$(area).sequence.state -v -v -o data/changes.osc.gz --size 1024

osmconvert -B=israel_and_palestine.poly data/changes.osc.gz --out-osc > data/changes.osc

gzip --force data/changes.

Things to note here in terms of command line utilities that do not exist in the docker right now:
gzip, pyosmium-get-changes
Files that are needed:
israel_and_palestine.poly

@zstadler
Copy link
Member

In the map generation code, I ended up using osmctools and the following update procedure:

osmupdate --verbose -B=israel_and_palestine.poly israel_and_palestine.osm.pbf israel_and_palestine-new.o5m
osmconvert --diff israel_and_palestine.osm.pbf israel_and_palestine-new.o5m --out-osc | gzip > changes.osc.gz
osmconvert israel_and_palestine-new.o5m -o=israel_and_palestine.osm.pbf

It produces changes.osc.gz as a changefile and updates israel_and_palestine.osm.pbf.

@HarelM
Copy link
Member Author

HarelM commented Oct 28, 2021

Thanks! the .poly file is from geofabrik as well, right?

@zstadler
Copy link
Member

The .poly is from the same source as the .osm.pbf file - both Geofabrik and openstreetmnap.fr have them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants