4

I have an OSM file and when I want to import it in my PostGIS base using osm2pgsql, I get the following error:

Processing: Node(130k 8.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Assertion failed: (xlon), function StartElement, file parse-xml2.c, line 101.

How can I fix this problem?

I use the following commands that works with other osm files excepting this one:

osm2pgsql "/Users/me/Desktop/my_osm_data.osm" -d my_osm_data -S "/Users/me/Documents/SIG/QGIS/osm2pgsql Styles/TC.style" -W -U postgres --slim -l

Here is the osm file: https://www.box.com/s/5a2qck2fc3tsnszimc4d

Stev_k
6,7892 gold badges36 silver badges48 bronze badges
asked Sep 9, 2012 at 16:28

1 Answer 1

1

if the same command works with other datasets and not with one particular then it sounds like the data are corrupted (maybe because a hicup when downloading).

Have you tried to re-download it? Can you try the PBF version if present?

answered Sep 9, 2012 at 18:00
4
  • No i cannot export in PBF from JOSM. In fact, it happens when i update cretins ways. But when i check for duplicate ways, nodes or anything? i find nothing. If I use the previous version without update, I will not get the trouble, if i don't update some ways, i will not get the trouble ... Commented Sep 9, 2012 at 22:01
  • I tried to load your data in JOSM, but get an error also. Looks like the dataset is broken. Commented Sep 10, 2012 at 4:12
  • 1
    Tested it out, node with id 1312365448 causes the trouble in JOSM. You can delete it with a good text editor (e.g. notepad++) and try the upload again. Commented Sep 10, 2012 at 6:21
  • 1
    Thank you you found the problem. at this node there was " action='delete' " that mayn't be processed by osm2pgsql. Commented Sep 10, 2012 at 12:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.