Skip to content

cubao/geobuf-cpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geobuf

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

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.

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:

git submodule update --init --recursive

install deps:

npm i -g geobuf
python3 -m pip install geobuf

compile & test:

make build
make test_all

make roundtrip_test_js
make roundtrip_test_cpp

About

A compact binary encoding for geographic data, with python binding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 59.6%
  • Python 37.3%
  • Makefile 2.0%
  • Other 1.1%