NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

after following this https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ tutorial I wonder, if it is possible to add additional files to a postgresql, even if it is running.

 osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/azerbaijan-latest.osm.pbf

Will executing this command again, only with a different osm.pbf, result in an error or will it merge the new data into the existing one? What if I add data which the existing data is a subset of (Germany already imported and I execute osm2pgsql with the Europe osm.pbf)? Will it overwrite the existing data?

asked 24 Jan '19, 14:49

Erik1988osm's gravatar image

Erik1988osm
21225
accept rate: 0%


This is a more that frequent FAQ.

  • In general datasets need to be merged before import, if they are very far apart they might not have common objects, but as soon as they have you will run in to constraint violations.
  • the --create flag will remove any existing data, so you definitely don't want to use that on trying a second import.
permanent link

answered 24 Jan '19, 19:07

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×204
×165

question asked: 24 Jan '19, 14:49

question was seen: 2,542 times

last updated: 24 Jan '19, 19:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum