Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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?

share|improve this answer
    
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 '12 at 22:01
    
I tried to load your data in JOSM, but get an error also. Looks like the dataset is broken. –  Andre Joost Sep 10 '12 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. –  Andre Joost Sep 10 '12 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 '12 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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