Coder Social home page Coder Social logo

osm-binary's Introduction

OSMPBF

https://github.com/openstreetmap/OSM-binary

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 https://wiki.openstreetmap.org/wiki/PBF_Format .

Note that this is a low-level library that does only part of the encoding/decoding needed for actually writing/reading an OSM PBF file. For something more complete see libosmium.

Github Actions C++ CI Github Actions Java CI Packaging status

Java Version

Building with Maven

We publish the Java library to Maven Central:

<dependency>
  <groupId>org.openstreetmap.pbf</groupId>
  <artifactId>osmpbf</artifactId>
  <version>1.5.0</version>
</dependency>

To build the Java library run:

mvn package

For a Java usage example, see ReadFileTest.

Building with Ant

If you can not use Maven for some reason you can use the Ant instead:

ant

This will build osmpbf.jar in the main directory.

This build is also used for Debian packaging.

C++ Version

To compile:

mkdir build && cd build
cmake ..
make

To install:

make install

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

tools/osmpbf-outline osm-file.osm.pbf

Using the C++ Library

To include in your program use:

#include <osmpbf/osmpbf.h>

and link with:

-pthread -lz -lprotobuf -losmpbf

License

The .proto definition files and osmpbf.h are licensed under the MIT license. The other source code is licensed under the LGPL v3+.

osm-binary's People

Contributors

joto avatar scrosby avatar simon04 avatar mazdermind avatar kayrus avatar sebastic avatar alex85k avatar tomhughes avatar dependabot[bot] avatar amdmi3 avatar woodpeck avatar hholzgra avatar pnorman avatar ranlvor avatar probonopd avatar simonpoole avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.