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

Hello Team,

I am trying to import the history file (OSH) from Geofabrik web site as shown below https://download.geofabrik.de/europe/great-britain.html [great-britain.osh.pbf, a file that contains the full OSM history for this region for processing with e.g. osmium. This file was last modified 3 days ago. File size: 1.5 GB; MD5 sum: eb54225a2019051736dde7b84d7dda3d]

I can successfully convert the OSH file to OSM file using the OSMIUM Utility Every time the extract for Great Britain fails with the error message when using OSM2PGSQL to import the OSM data into the PostGreSQL database. I have tried a couple of times (with different files) and get same issue. WARNING: Node 5156175847 (version 2d) has an invalid location and has been ignored. This is not expected to happen with recent planet files, so please check that your input is correct. Processing: Node(133658k 38.4k/s) Way(25181k 21.20k/s) Relation(13110 126.06/s)node cache: stored: 133658930(100.00%), storage efficiency: 50.00% (dense blocks: 0, sparse nodes: 133658930), hit rate: 99.85% Osm2pgsql failed due to ERROR: Missing ref on relation member

The history extracts for other regions like Australia / New Zealand / San Francisco etc all work perfectly fine without any issues and this is only for Great Britain. Can you please help me with the issue ? Is this something to do with the extract data contents ?

asked 20 Oct '17, 07:55

rchittor's gravatar image

rchittor
21112
accept rate: 0%


osm2pgsql is not suitable for importing history files into PostGIS. In fact, there is no software that does this in a full-featured way. It is a difficult issue because many different historical versions of an object have to be created - often more versions than the object has.

You may have processed other history files without errors, this does not mean that the results will make sense.

The only software that comes near importing a history file into PostGIS is https://github.com/MaZderMind/osm-history-renderer/tree/master/importer but it is old and unmaintained.

permanent link

answered 20 Oct '17, 09:13

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

×293
×263
×196
×1

question asked: 20 Oct '17, 07:55

question was seen: 3,808 times

last updated: 20 Oct '17, 09:13

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