georender-pack.rs
Pack osm data into a buffer based on the peermaps buffer schema. This is part of the peermaps pipeline.
If you want to decode these buffers, use the Node.js version of this library or open a pull request here! :tada:
Installation
In Cargo.toml
georender-pack = "x.x.x" # latest version
Usage
encode::node
Signature
node
Example
use encode;
use Error;
let id = 1831881213;
let lon = 12.253938100000001;
let lat = 54.09006660000001;
let tags = vec!;
let bytes = node.unwrap;
encode::way
Signature
way
Example
use Error;
use encode;
let tags = vec!;
let refs = vec!;
let mut deps = new;
deps.insert;
deps.insert;
deps.insert;
let bytes = way.unwrap;
encode::way_from_parsed
Signature
way
encode::relation
Signature
relation
encode::relation_from_parsed
Signature
relation_from_parsed
Example
For example usage with the osmpbf Rust crate for parsing PBF files, see example/osmpbf/main.rs.
cargo run --example osmpbf /path/to/my.pbf
Development
cargo test
There is a limited test suite on creating and encoding new PeerLine, PeerNode, and PeerArea objects.
License
MIT