Skip to main content

Fast Google Encoded Polyline encoding & decoding

Project description

polyline-rs

Python Free-Threaded Compatible PyPI - Python Version Liberapay Patrons GitHub Sponsors

Fast Google Encoded Polyline encoding & decoding in Rust with Python bindings. Library with out-of-the-box support for both (lat, lon) and (lon, lat) coordinates.

Encoded Polyline Algorithm Format

Installation

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polyline_rs-1.2.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl (403.6 kB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl (409.9 kB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ ARM64

polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (218.7 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.8 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

polyline_rs-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl (206.5 kB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

polyline_rs-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl (212.5 kB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

polyline_rs-1.2.0-cp39-abi3-win_amd64.whl (105.1 kB view details)

Uploaded CPython 3.9+Windows x86-64

polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_x86_64.whl (403.5 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_aarch64.whl (409.9 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (218.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (208.7 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

polyline_rs-1.2.0-cp39-abi3-macosx_11_0_arm64.whl (206.4 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

polyline_rs-1.2.0-cp39-abi3-macosx_10_12_x86_64.whl (212.4 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file polyline_rs-1.2.0.tar.gz.

File metadata

  • Download URL: polyline_rs-1.2.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for polyline_rs-1.2.0.tar.gz
Algorithm Hash digest
SHA256 249e7c3e8937ca91ed3ec167bed832349d585bfe00adb7d8148a18d8f7e366d4
MD5 5a895799bb919aa173aaded131e93e83
BLAKE2b-256 f37066ee11cc870ff60f5ff1325ade0327259e39edc1eee902d83da383d6a1d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0.tar.gz:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 98f1d601f1292e320a0c71bd7314fa21a96b64c651c139a5cb9c375738ede4ca
MD5 5c63dba62a3fabbefa30ec59a75e2595
BLAKE2b-256 994b25b2bdf597b81cd26ed913618950245e047abae432c405a8ef8f5499a5a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ffea51efafbee5351301347853e785d723ac1164493b4b019cb516cb7cf9da8a
MD5 56c68ca1f665532ed521e63324fb1e23
BLAKE2b-256 5fedb493fc3b504729ea9658f3b7edd394dfbb7ba31da30a76238b3de48b0d59

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 473232279c8e55ca7177a9247defa5af9689d8fcdfcfcf87b119220a9d9a4b53
MD5 26f94fa2dc16a9991e383e32c5f15902
BLAKE2b-256 1427ca19fee09650b1696a3c2b96d6efccee8d2a41e853dad1b84b5d8a33c0d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a2f9f017aeb6c22d0f25829f6fbb7239231c91081d85bc16f98c9fbfa7063584
MD5 2d1cccdd9a67d1c13fb079652d9fe667
BLAKE2b-256 6332a4b8849b0d0a78f47a30649b112eea65fc16505114fc73e7e12734e3f2b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa3a1d1642c248b39eef4b7987eec017fd376ac40265771d6fb17b78d24f3ae4
MD5 b66b0c9d3733a8c740afac89038df9d3
BLAKE2b-256 0163248bdeb688fe90af3bfb25bdee3e5ce67d8abfa89f7919e3fc722631d4f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-macosx_11_0_arm64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 844cac000e1242ac6dcb6317e5bf7599897c652b075046d18193e3e1b0386f47
MD5 f999de1bf83426209b8bb6fb68ca469e
BLAKE2b-256 3660456270532b8ed2fc04672d292288c5dc128b7beda0a7c9d7f88e1e28b402

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp313-cp313t-macosx_10_12_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: polyline_rs-1.2.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 105.1 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5d3dc115f46488c73c74a9d47274a90188f096e8ff5bf2030c05e3aaaf8bd070
MD5 126886463057c25db759b0e88bb57d76
BLAKE2b-256 7393abb4258af68fbc0fd5bce7c0f54afa4eae6eb826f5c0a34bdb700b2ee044

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-win_amd64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 40b4387d2f4e3d0d2def32129a21b013e7d8e4c5eb6b39814a6f8738ca0e2cea
MD5 8df583d689c0f08272c5fe2dbad9e297
BLAKE2b-256 5de7e870829cf6b21c0f5c59f378813374670877992d84fb9af07d0b1cbd8040

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d45b58379e99aadf42050fc0e8a63cda52190037f82192f210eac3a863c87ae7
MD5 eb6bc34200ccd1ac172872e8556eda44
BLAKE2b-256 db61cb696a6958ed29779b37205d3c972a35f749bf5244b708e5455dea6a0f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-musllinux_1_2_aarch64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1be5056bbc7258274a6e3e9d2a3daaeb1e0a688168da3f5843cc24028843aa32
MD5 5d5737e9a685e6f16b9f9fc300194458
BLAKE2b-256 f9c1952a4779ac924bb3a874e9e055970b20924673217ad9222ed831cde96a91

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d45a21cb8ac93137078b35ed40bbf110e604c37eb1667f91a89f0e8a4d2c97d1
MD5 89ad039cf70dcb00d88f5ddc5a88c66a
BLAKE2b-256 71159052e4bbc3598bb397317d27efbb8f7a438502bf497e56b4194d41bc9cd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a57921145af86863e0dc6cd921633fbf319e303e1356a665690c8c993e7f2ceb
MD5 386c6babaab63e91e79e21d6b31c350b
BLAKE2b-256 77a18682ff01dff0c5ca4513916c1c6e51d3c1173953ad60538a4b7c95ca21c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polyline_rs-1.2.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polyline_rs-1.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aa13b50d335d2d88b516f69ce0a028d51612c91b8f88fac18cf326aed2526fbe
MD5 ae02972b9991e4c212a419815faad647
BLAKE2b-256 c91546500e4c8d9c408cfb2663beebabd7f5f41cd421b9c8c3369f63e0b4f9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyline_rs-1.2.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: workflow.yaml on Zaczero/polyline-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page