项目作者: district10

项目描述 :
A compact binary encoding for geographic data.
高级语言: C++
项目地址: git://github.com/district10/geobuf-cpp.git
创建时间: 2021-09-19T11:10:28Z
项目社区:https://github.com/district10/geobuf-cpp

开源协议:

下载


geobuf

C++ port of https://github.com/mapbox/geobuf,
and with python binding.

Python binding

Install

  1. # from pypi
  2. pip install -U pybind11_geobuf
  3. # from source
  4. git clone --recursive https://github.com/cubao/geobuf-cpp
  5. pip install ./geobuf-cpp
  6. # or just
  7. 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.

Dependencies

All dependencies are header-only, including:

  • rapidjson for JSON read/write
  • geojson-cpp for GeoJSON representation
    • dependencies
    • forked from mapbox, with some modifications to geojson-cpp and geometry.hpp
      • added z to mapbox::geojson::point
      • added custom_properties to geometry/feature/feature_collection
  • protozero for protobuf encoding/decoding

dbg-macro and doctest are dev dependencies.

Simple roundtrip tests pass, have identical results to JS implementation.

Development

pull all code:

  1. git submodule update --init --recursive

compile & test:

  1. make build
  2. make test_all
  3. make roundtrip_test_js
  4. make roundtrip_test_cpp