NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi - I'm using the code sample here:

http://stackoverflow.com/questions/4663298/protobuf-net-deserialize-open-street-maps

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

https://github.com/scrosby/OSM-binary/blob/master/src/

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:

http://download.geofabrik.de/europe.html

asked 31 May '13, 15:09

simonthorogood's gravatar image

simonthorogood
26112
accept rate: 0%

2

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

he_the_great
1.2k61423
accept rate: 14%

Follow this question

By Email:

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

By RSS:

Answers

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:

×60
×25

question asked: 31 May '13, 15:09

question was seen: 9,044 times

last updated: 10 Aug '13, 18:11

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum