0

I see that you can download Ordnance Survey maps as ESRI Shape files, so I would like to take those and convert them into a .osm.pbf file so that I can more easily use them.

Are there any tools out there that do this? Or, sources of Ordnance Survey .osm.pbf files?

  • Pbf is mostly a data transfer format and seldom used directly except in vector tiles. Usually people make conversion FROM pbf into other formats with ogr2pgsql etc. What is your use case? – user30184 Jul 1 '16 at 21:47
  • Thanks. I realize what .pbf files are for. I use libosmscout to convert .osm.pbf files into different usable formats for quick viewing. And, since it only supports osm.pbf files, I wanted to see if there was a way to get Ordnance Survey files into that so I could convert them. – Nic Hubbard Jul 1 '16 at 21:50
  • 3
    So you want to convert Ordnance Survey shape files into OpenStreetMap pbf files just so you can convert them into some other format? If you tell us what the "different usable formats" are maybe there's a direct way of converting the Ordnance Survey shapes to that. – Spacedman Jul 2 '16 at 7:54
  • @Spacedman - The "different usable formats" are the database and index files that libosmscout creates. They are specific to that tool, so that is why I am needing them to be in .osm.pbf because I use libosmscout in my projects. – Nic Hubbard Jul 4 '16 at 20:17
  • Have you tried the "conversion tools" listed here: wiki.openstreetmap.org/wiki/Software_comparison/… – Spacedman Jul 5 '16 at 7:20
0

You can have a look at the OSM wiki about Shapefiles and Converting_map_data_between_formats to get all known tools for converting shapefiles into raw OSM XML format or compressed binary PBF files.

  • You are seeing an option to convert to compressed binary PBF? I am not seeing that. – Nic Hubbard Jul 7 '16 at 17:37
  • Indeed ... on the last mentioned wiki page there is no link to the often used and popular wiki.openstreetmap.org/wiki/Osmconvert ... this tool should do the job. – stephan75 Jul 8 '16 at 5:57
  • But it doesn't look like you can convert from ESRI Shape files. – Nic Hubbard Jul 8 '16 at 18:10
  • 1
    So you are looking for a tool that convers shapefiles directly to osm.pbf format? If yes, and there is not tool available for this, you can consider two ways: use raw osm.xml format as a between file format, or find out whether libosmscout can use osm.xml files next to compressd osm.pbf files. Success? – stephan75 Jul 9 '16 at 9:58
  • Correct. I need to convert shape files to osm.pbf. – Nic Hubbard Jul 11 '16 at 17:49

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.