diff --git a/README b/README.md similarity index 56% rename from README rename to README.md index a7fdc67..4c62e66 100644 --- a/README +++ b/README.md @@ -1,62 +1,84 @@ -OSMPBF -====== +# 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 . +For more information see https://wiki.openstreetmap.org/wiki/PBF_Format . -Java Version -============ +## Java Version To build the osmpbf.jar file run: - ant + +```sh +ant +``` For a Java usage example, see src.java/crosby/binary/test/ReadFileExample.java -C Version -========= +## C Version To compile: - make -C src + +```sh +make -C src +``` To install: - make -C src install + +```sh +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: + +```sh make -C tools +``` -Using the C Library -=================== +## Using the C Library To include in your program use: +```c #include +``` and link with: - -pthread -lz -lprotobuf-lite -losmpbf + +``` +-pthread -lz -lprotobuf-lite -losmpbf +``` -Debian/Ubuntu Packages -====================== +## Debian/Ubuntu Packages To build the Debian/Ubuntu packages: - debuild -I -us -uc + +```sh +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 + +```sh +sudo dpkg --install ../libosmpbf-dev_*.deb +sudo dpkg --install ../libosmpbf-java_*.deb +sudo dpkg --install ../osmpbf-bin_*.deb +``` To clean up after: - debclean +```sh +debclean +``` + +## License + +The .proto definition files and osmpbf.h are licensed under the MIT license. +The other source code is licensed under the LGPL v3+. -License -======= -The .proto definition files and osmpbf.h are licensed under the MIT license. The other source code is licensed under the LGPL v3+.