Fast Google Encoded Polyline encoding & decoding in Rust
Project description
polyline-rs
Fast Google Encoded Polyline encoding & decoding in Rust. A Python PyO3 wrapper for polyline with out-of-the-box support for both (lat, lon) and (lon, lat) coordinates.
Installation
The recommended installation method is through the PyPI package manager. The project is implemented in Rust and several pre-built binary wheels are available for Linux, macOS, and Windows, with support for both x64 and ARM architectures.
pip install polyline-rs
Basic usage
from polyline_rs import encode_latlon, encode_lonlat, decode_latlon, decode_lonlat
line = encode_latlon([(38.5, -120.2), (40.7, -120.95), (43.252, -126.453)], 5)
assert line == "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
coords = decode_latlon(line, 5)
assert coords == [(38.5, -120.2), (40.7, -120.95), (43.252, -126.453)]
coords2 = decode_lonlat(line, 5)
assert coords2 == [(-120.2, 38.5), (-120.95, 40.7), (-126.453, 43.252)]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file polyline_rs-1.0.0.tar.gz
.
File metadata
- Download URL: polyline_rs-1.0.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 926d322a7ce6c2a89ceb724070f2a91c442ebf011bc8fee4d4f8b9949db12c39 |
|
MD5 | 41cc4c7935e06a12a25300dd8c55ea57 |
|
BLAKE2b-256 | 27d5be32017f87bd834727c2bc4350abc91b13eaf38c85edbacec0af016d5bee |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-win_amd64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 121.3 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 325f664e3efb8e06008993c122b37fa25087d598754774d5d25af4c3ba517a8f |
|
MD5 | bc61b7bb13342b250d31799cb0574d84 |
|
BLAKE2b-256 | 591a942a89d288ddedfbbb0f9c6c510ca2eee85ac7ae3f698a377b67e9e0bb93 |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 417.2 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14631ff095a8ceef063260dabebd23e568a4c6f29a813e1255daed784270b000 |
|
MD5 | 54ee7c82e4bcfab50a3a102d78e5bf84 |
|
BLAKE2b-256 | b984b410a83902869fd7366abfcae790d7ff7d8dc6ec8bb9b248445c94558133 |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 434.0 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe9ed44069332b69f25ad4d51b1afb0114f2ae43cef10fcebaa74c6335f277dd |
|
MD5 | 581835e1457b27451955752137f45ba6 |
|
BLAKE2b-256 | 18f39ac335b3675685436e96bed5c21c3eb744b5fd324dab9ee5bdd4b2e9d98c |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 233.1 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f3f2ef8dd8745904d7979abcfcbb6aff79fb6ecf0f6cd234f5780344187885a |
|
MD5 | f813e9752e45bf459197adfdf607978f |
|
BLAKE2b-256 | c3f9e3d09cbfc336d5e25711b70032e394b17130cf5d628fa125629ecd2e7228 |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 222.9 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 358ce9948ca47caaa1e4ff0bec602beda2606244eae937480e83ef85be8a1d70 |
|
MD5 | ab766cd7fa4119d4ebc6cbd6921fbcd3 |
|
BLAKE2b-256 | 34d421c84ac2a0803f1478a975f2d2e9e3323813088f267664981fcf1fd2d761 |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 217.2 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9309bdc197c46305820acb92c6a01b3f200f0e730c10e8974cecd439fe2dddcd |
|
MD5 | c5d839161d2f66b882c5e1112fe00b07 |
|
BLAKE2b-256 | 6467e72d2f8b2eb6b2c95f8e128e5e444c3c25769e521f3a2700916d0d3449c0 |
File details
Details for the file polyline_rs-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: polyline_rs-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 220.5 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 859a62050019f1d16cb7570d4ffd6d2cc2a12ec3233a03079f1ef5cbf3232c1a |
|
MD5 | 302e3955fed973d45aeb4c041357ac3c |
|
BLAKE2b-256 | 6e8991f9a118a91630ef570f49e2657b1095591c943667753ec29ef85e9f6d16 |