Hi all, I'm very new to OSM and postgreSQL ...I've been trying for some days to load .oms extracts onto PostgreSql through osm2pgsql..and I just can't get my around it. Need some help, plz...
I've tried to download .pbt file but I got other XML parsing error such as "invalid token"... What do I do wrong? Thanks asked 24 Oct '17, 16:07 psqldaimon SimonPoole ♦ |
Visual inspection didn't indicate anything obviously wrong with the .osm file (at least the first and last couple of dozen elements, so it should have read at least a couple of nodes. However I suspect the -r flag is wrong according to the documentation that should by -r xml for osm format files NOT -r osm (and for pbf you should be specifying -r pbf). answered 24 Oct '17, 20:10 SimonPoole ♦ I put -r flag as xml and it worked as a charm... except that I got another error message: Osm2pgsql failed due to ERROR: XML parsing error at line 17257713, column 1: unclosed token Any suggestions? Thanks
(24 Oct '17, 22:10)
psqldaimon
1
If you downloaded the files yesterday, the uncompressed file should be 5668669254 bytes large (your issue sounds like a corrupted file, I checked my copy and it was OK at and around the line in question)
(24 Oct '17, 23:50)
SimonPoole ♦
Hi SimonPoole, I followed your hint and I realized that trying different unzipping softwares I was always getting different files! I picked the file with bytes number closer to the one you suggested...and HAlleluiaaaa, it worked! Thanks a lot Problem solved. Many lessons learned (and many unzipping softwares to be binned)
(25 Oct '17, 11:03)
psqldaimon
well normally when in doubt we would have compared checksums, but that would have required finding a windows variant of what is available on Linux.
(25 Oct '17, 11:09)
SimonPoole ♦
|
Could you make the input file available somewhere or point to from where you got it?
Sure! http://osm-estratti.wmflabs.org/estratti/Emilia-Romagna
Pls don't answer your own question :-)
There are 7 files listed, which one/format did you download?
:) I tried .oms and the .pbf (no cut)