Why not ask your question on the new OpenStreetMap Community Forum?

Hi - I'm using the code sample here:


To parse a sample osm.pbf export. I generated C# classes from the .proto definitions here:


using the protogen util associated with protobuf-net

The code runs and I can see valid looking data in the string table for each PrimitiveBlock instance. However, the PrimitiveGroup list always has a single item which is unpopulated (e.g. no nodes, ways, relations etc.).

I'm using a sample data file from here:


asked 31 May '13, 15:09

simonthorogood's gravatar image

accept rate: 0%


A very developer-y question that might perhaps yield better/more responses if posted to the dev mailing list, see lists.openstreetmap.org.

(31 May '13, 22:20) Frederik Ramm ♦

If you have found an answer you should post it; this isn't a direct answer, but may contain information which would help others who are trying to read PBF.

I translated the PBF Format into D code. I then wrote up a blog series to detail what I went through. I believe that D is clean enough that those familiar with C syntax can easily understand how PBF is laid out (if not, let me know so I can correct that belief). Hope this helps someone.

permanent link

answered 10 Aug '13, 18:11

he_the_great's gravatar image

accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 May '13, 15:09

question was seen: 8,350 times

last updated: 10 Aug '13, 18:11

powered by OSQA