Go to file
Jochen Topf f0da31fd79 Improved debian build, better README
This brings the debian build more in line with the actual released debian
packages which split up the program into three packages.
The tools Makefile has more warnings enabled.
The README goes into a bit more detail.
2014-03-10 22:00:35 +01:00
debian Improved debian build, better README 2014-03-10 22:00:35 +01:00
include/osmpbf 1.3.1 Release 2013-12-11 21:49:36 +01:00
resources Java file read demonstration, to help people getting started. 2012-10-19 23:00:21 +01:00
src Force building with -fPIC. 2013-12-12 22:56:41 +01:00
src.java/crosby/binary Fix line endings (CRLF->LF), remove spaces at end of lines 2013-09-02 20:44:02 +02:00
tools Improved debian build, better README 2014-03-10 22:00:35 +01:00
.gitignore Improved debian build, better README 2014-03-10 22:00:35 +01:00
CMakeLists.txt More compilation fixes 2013-07-22 23:13:26 +06:00
COPYING.osmpbf Add in LGPL copyright notices to the osmpbf library. 2011-01-02 20:21:48 -06:00
README Improved debian build, better README 2014-03-10 22:00:35 +01:00
ReleaseNotes.txt 1.3.1 Release 2013-12-11 21:49:36 +01:00
build.sh Protobufs and common Java code for binary format. 2010-08-25 11:40:06 -05:00
build.xml Added build file by Giovanni Mascellani. 2011-01-12 20:09:12 -06:00
magic add magic file 2011-06-05 11:51:11 +02:00
pom.xml 1.3.1 Release 2013-12-11 21:49:36 +01:00

README

OSMPBF
======

Osmpbf is a Java/C library to read and write OpenStreetMap PBF files.
PBF (Protocol buffer Binary Format) is a binary file format for OpenStreetMap
data that uses Google Protocol Buffers as low-level storage.

For more information see http://wiki.openstreetmap.org/wiki/PBF_Format .


Java Version
============

To build the osmpbf.jar file run:
  ant

For a Java usage example, see src.java/crosby/binary/test/ReadFileExample.java


C Version
=========

To compile:
  cd src
  make

To install:
  cd src
  make install

There is a tool named osmpbf-outline that shows a debug output of the contents
of a PBF file. To compile it:
  cd tools
  make


Using the C Library
===================

To include in your program use:

#include <osmpbf/osmpbf.h>

and link with:
    -pthread -lz -lprotobuf-lite -losmpbf


Debian/Ubuntu Packages
======================

To build the Debian/Ubuntu packages:
  debuild -I -us -uc

To install the Debian/Ubuntu packages:
  sudo dpkg --install ../libosmpbf-dev_*.deb
  sudo dpkg --install ../libosmpbf-java_*.deb
  sudo dpkg --install ../osmpbf-bin_*.deb