Debian Codegraph @

/

debian rust-polyline 0.11.0+dfsg-1debian librust-polyline-dev debian librust-polyline+default-dev debian librust-polyline-0-dev debian librust-polyline-0+default-dev debian librust-polyline-0.11-dev debian librust-polyline-0.11+default-dev debian librust-polyline-0.11.0-dev debian librust-polyline-0.11.0+default-dev debianjsonmakefilemarkdownrustshelltomlyaml 21 files · 68 symbols
View dependency graph

Depends on

  • dh-cargo (dh-sequence-cargo)
  • rust-geo-types (librust-geo-types-0.7+default-dev)
  • cargo, debhelper-compat, libstd-rust-dev, rustc
README (full)

polyline

polyline

polyline on Crates.io Documentation Discord

Fast Google Encoded Polyline encoding & decoding in Rust.

Example

use polyline;
use geo_types::line_string;
let coord = line_string![(x: -120.2, y: 38.5), (x: -120.95, y: 40.7), (x: -126.453, y: 43.252)];
let output = "_p~iF~ps|U_ulLnnqC_mqNvxq`@";
let result = polyline::encode_coordinates(coord, 5).unwrap();
assert_eq!(result, output)

A Note on Coordinate Order

This crate uses Coord and LineString types from the geo-types crate, which encodes coordinates in (x, y) / (lon, lat) order. The Polyline algorithm and its first-party documentation assumes the opposite coordinate order. It is thus advisable to pay careful attention to the order of the coordinates you use for encoding and decoding.

Documentation

FFI

C-compatible FFI bindings for this crate are provided by the polyline-ffi crate.

dir .github/
dir benches/
dir debian/
dir resources/
dir src/
file .cargo_vcs_info.json
file .gitignore
file CHANGELOG.md
file CODE_OF_CONDUCT.md
file Cargo.toml
file Cargo.toml.orig
file LICENSE-APACHE
file LICENSE-MIT
file README.md
file bors.toml