I have a set of geospatial data, lines (streets) in geojson and shp file format which which i want to convert to PBF (Protocolbuffer Binary Format).

I am presently working with QGIS.

Please does anyone have an idea of how i can go about this and what tool(s) can be used?

  • 2
    Hi, welcome to GIS.SE! To help us help you can you address a few minor issues: Firstly what's a pbf mean to you? secondly what software (libs, programming languages) do you have at your disposal? – Michael Stimson Jun 26 '15 at 4:44
  • An Open Street Map "Protocolbuffer Binary Format?". – GISI Jun 26 '15 at 5:05
  • I have corrected my question and explained what i am trying to do. – mapperx Jun 26 '15 at 5:52

The GDAL OSM driver http://www.gdal.org/drv_osm.html which is used by QGIS is read-only.

So you are out of luck to create OSM files out of QGIS, either uncompressed or compressed to pbf format.

As an alternative, you can use the JOSM editor to load the GIS data using plugins, and export to an OSM file. Don't upload to the server on exiting!

PBF files can be created in a second step with osmconvert


I was able to convert the osm file to PBF (Protocolbuffer Binary Format). I used the osmconvert which is a simple command line tool that works well.


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.