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

Append data from Geofabric not shown in OSM

0

Hi Guys,

After successfully building a tile server and loading data into the DB's with below command :

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

Once i want to add data for another map , example for Liechtenstein to append it to Gis database , without removing the existing data , i am using below command and it finish successfully.

osm2pgsql -d gis --append --slim -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 10500 --number-processes 4 -S ~/src/openstreetmap-carto/openstreetmap-carto.style /home/renderaccount/data/liechtenstein-latest.osm.pbf

However the map for Liechtenstein it's not shown in the browser , i still have only data for Austria. Am i doing something wrong, or additional commands should be execute after the append of data in order to be shown on the map. Can someone help me with this topic , or to provide a useful link.

Thanks guys in advance.

asked 10 Feb '21, 08:20

DavorB0's gravatar image

DavorB0
22445
accept rate: 0%


One Answer:

1

You can't use osm2pgsql this way (or at least it's not designed for it). Append is for updates to your existing data, not for appending additional geographical regions. You should merge your data using Osmosis before uploading to PostGIS

answered 10 Feb '21, 13:58

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

If you are using osm2pgsql 1.4.0 or newer you can also simply use both input files on the command line and import them in one go. Make sure all extracts that you are using are from the same point in time.

Do not try this with older osm2pgsql versions, though. It is not guaranteed that it will work correctly.

(10 Feb '21, 15:30) Jochen Topf

Source code available on GitHub .