About
Zero-dependency Rust crate for encoding and decoding Google's polyline format.
Compared to the georust/polyline crate, the polyline-iter decodes polyline into an iterator over points instead of vector, which is benefitial when only a single iteration over the polyline is needed. And in such cases it performs twice as fast as the georust/polyline crate (check cargo bench for exact numbers) and has no hidden allocations.
Usage
Add this to your Cargo.toml:
[]
= "0.3"
Example
let iter = decode;
assert_eq!;
// Count points without collecting them
assert_eq!;
// Iterator approach allows to transcode polyline to another precision without intermediate allocations.
let polyline5 = encode;
assert_eq!;
assert_eq!;
// Keeping all the power of working with slices
let points = vec!;
assert_eq!;
License
All code in this project is dual-licensed under either:
at your option.