forked from openstreetmap/OSM-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
59 lines (36 loc) · 1.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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:
make -C src
To install:
make -C src install
There is a tool named osmpbf-outline that shows a debug output of the contents
of a PBF file. To compile it:
make -C tools
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
To clean up after:
debclean