Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.gitignore
OSMpbfParser.py
README.md
fileformat_pb2.py
osmformat_pb2.py
pbf2sqlite-erd.dia
pbf2sqlite.py
pbf2xml.py

README.md

Open Street Map pbf Parser

The parser consists of the following three files: https://github.com/ReneNyffenegger/about-Open-Street-Map/blob/master/pbf-parser/fileformat_pb2.py, https://github.com/ReneNyffenegger/about-Open-Street-Map/blob/master/pbf-parser/osmformat_pb2.py, both of which are generated and https://github.com/ReneNyffenegger/about-Open-Street-Map/blob/master/pbf-parser/OSMpbfParser.py which depends on the former two files and does the actual parsing. See also my blog entry.

Scripts

Scripts that use OSMpbfParser.py:

Installing google's protocol buffers

On Windows

protoc.exe

Download Protocol Buffers Compiler (protoc.exe): https://protobuf.googlecode.com/files/protoc-2.5.0-win32.zip

set %PATH% so that it points to protoc.exe.

Protocol-Buffer sources

Download Protocol Buffers 2.5.0 full source from https://code.google.com/p/protobuf/downloads/list/protobuf-2.5.0.tar.bz2

Extract sources and cd into python directory:

cd protobuf-2.5.0\protobuf-2.5.0\python

then execute

python setup.py build
python setup.py test
python setup.py install

On Ubuntu

sudo apt-get install python-protobuf

Links

Links that were helpful: