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

1 Answer 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?

  • 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 …
    – M-Rick
    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.
    – AndreJ
    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.
    – AndreJ
    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.
    – M-Rick
    Sep 10, 2012 at 12:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.