Skip to content

osm2pgsql-replication.py updating an extracted (by polygon clip) dataset? #1612

Answered by lonvia
bjornharrtell asked this question in Q&A
Discussion options

You must be logged in to vote

osm2pgsql-replication.py can only be used with a predefined replication source.

Updating a custom extract is a lot more involved. It roughly works along those lines:

A. Initial import:
1. Download europe
2. Create extract with osmium extract
3. Import extract with osm2pgsql --slim
4. Keep original europe and extract around.

B. Update:
1. Update europe file using pyosium-up-to-date.
2. Create a new extract with osmium extract
3. Create a diff file between old extract and new extract using osmium derive-changes
4. Apply diff with osm2pgsql -a --slim
5. Keep updated europe file and new extract around.

Repeat B for each update cycle.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@bjornharrtell
Comment options

@joto
Comment options

joto Jan 17, 2022
Maintainer

@bjornharrtell
Comment options

Answer selected by bjornharrtell
Comment options

You must be logged in to vote
1 reply
@bjornharrtell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants