A compact binary encoding for geographic data.
C++ port of https://github.com/mapbox/geobuf,
and with python binding.
Install
# from pypi
pip install -U pybind11_geobuf
# from source
git clone --recursive https://github.com/cubao/geobuf-cpp
pip install ./geobuf-cpp
# or just
pip install git+https://github.com/cubao/geobuf-cpp.git
(you can build wheels for later reuse by pip wheel git+https://github.com/cubao/geobuf-cpp.git
)
See tests/test_geobuf.py
for usage.
All dependencies are header-only, including:
rapidjson
for JSON read/writegeojson-cpp
for GeoJSON representationgeojson-cpp
and geometry.hpp
z
to mapbox:custom_properties
to geometry/feature/feature_collectionprotozero
for protobuf encoding/decodingdbg-macro
and doctest
are dev dependencies.
Simple roundtrip tests pass, have identical results to JS implementation.
pull all code:
git submodule update --init --recursive
compile & test:
make build
make test_all
make roundtrip_test_js
make roundtrip_test_cpp