I downloaded a .pbf file from this link and then I renamed it to tu.osm because it is an .osm file.

Then I used osmconverter to convert it to .pbf using:

c:\osm>osmconvert tu.osm --out-pbf >tu.pbf

but I receive an error:

Error: could not open input file

despite the file is 64032 kb

Why is that happening?


You can't just rename a *.osm.pbf file to *.osm because PBF is a binary file type and OSM a XML file type. This will make your OSM file invalid and it's no longer readable. Instead, download *.osm.bz2 and unzip the file so it will be a valid *.osm file. However, osmconvert is also capable to read *.osm.bz2 files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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