I'm attempting to import the 45GB (compressed) planet-latest.osm.bz2 file downloaded from ftp://ftp.spline.de/pub/openstreetmap/planet/planet-latest.osm.bz2 but I receive parsing errors. As of now I have had two separate files fail in the same way - downloaded approximately 1 month apart.
The import command is as follows:
nohup osm2pgsql -l --bbox -180,-59,-26,85 -U gis -c -I -v --unlogged --drop -s data/planet-latest.osm.bz2 &
and the errors I receive are:
...
Entity: line -1123806515: parser error : Attribute user redefined
er="Schandlers" uid="51:48Z" version="1" changeset="29" user="OrcaDan" uid="411"
^
Entity: line -1123806515: parser error : Attribute uid redefined
er="Schandlers" uid="51:48Z" version="1" changeset="29" user="OrcaDan" uid="411"
^
data/planet-latest.osm.bz2 : failed to parse
Error occurred, cleaning up
This is a real pain as the file takes several days to download and the import can be running for several more days before the error is thrown.
I'm trying to understand what is causing the failure and what I can do to avoid it. My only theory is that the file is getting updated on the server as I am downloading it and I somehow get an invalid combination of two files. However I'm not really sure this is possible...
My question has three parts:
- what is causing the error I'm seeing?
- is there a faster way to validate a planet file than waiting for the import to fail?
- can anyone point me to a recent and known-good file, if the file itself is the problem?
osm2pgsql version: osm2pgsql SVN version 0.82.0 (64bit id space), installed from Ubuntu 14.04 repos.