Fast Google Polyline encoding and decoding using Rust FFI
Project description
Installation
pip install pypolyline Please use a recent (>= 8.1.2) version of pip.
Supported Python Versions
Python 2.7 Python 3.5
Supported Platforms
Linux (manylinux1-compatible)
OS X
Windows 32-bit / 64-bit
Usage
from pypolyline.util import encode_coordinates, decode_polyline
coords = [
[52.64125, 23.70162],
[52.64938, 23.70154],
[52.64957, 23.68546],
[52.64122, 23.68549],
[52.64125, 23.70162]
]
# precision is 5 for Google Polyline, 6 for OSRM / Valhalla
polyline = encode_coordinates(coords, 5)
# polyline is 'ynh`IcftoCyq@Ne@ncBds@EEycB'
decoded_coords = decode_polyline(polyline, 5)
Attempts to decode an invalid Polyline will throw util.DecodingError
Attempts to encode invalid coordinates will throw util.EncodingError
How it Works
FFI using ctypes and a Rust binary
License
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypolyline-0.1.5-py2.py3-none-win_amd64.whl.
File metadata
- Download URL: pypolyline-0.1.5-py2.py3-none-win_amd64.whl
- Upload date:
- Size: 728.8 kB
- Tags: Python 2, Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edd2731c529ded56150999da02d4131b1c2edfe23af2efda980e1e9cd0f35224
|
|
| MD5 |
0220a2ce13358d210bbf69627138d046
|
|
| BLAKE2b-256 |
dd9ef2a66e2ba8993f78a6d08b253386ce11a9b80af0193b606880f682f626e2
|
File details
Details for the file pypolyline-0.1.5-py2.py3-none-win32.whl.
File metadata
- Download URL: pypolyline-0.1.5-py2.py3-none-win32.whl
- Upload date:
- Size: 788.3 kB
- Tags: Python 2, Python 3, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdcdd2a9b1724469a6f06cc3303f7d044c67441fd3d9bde624d8295da1fb2ab4
|
|
| MD5 |
7254885724372d647b69cf058c1ee013
|
|
| BLAKE2b-256 |
13111ae60e93c71c8237fe472a1593b24c8b86ea9e758b7c50d6289756d45a80
|
File details
Details for the file pypolyline-0.1.5-py2.py3-none-manylinux1_x86_64.whl.
File metadata
- Download URL: pypolyline-0.1.5-py2.py3-none-manylinux1_x86_64.whl
- Upload date:
- Size: 541.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e910868b1c7e81c17a4c03666aa63926dd1e594946b9f225818322dc98f6bb
|
|
| MD5 |
f9cb6530fca4803c8f32a9fa0a66ce91
|
|
| BLAKE2b-256 |
6626a3813cded310b9a509de9a5bd76936f3682a80ae059546cf678581eb5122
|
File details
Details for the file pypolyline-0.1.5-py2.py3-none-macosx_10_6_intel.whl.
File metadata
- Download URL: pypolyline-0.1.5-py2.py3-none-macosx_10_6_intel.whl
- Upload date:
- Size: 668.2 kB
- Tags: Python 2, Python 3, macOS 10.6+ Intel (x86-64, i386)
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa0e3e4dff7afc961a771178b47fe2f3480a3e18098f17f8e89a503996767f38
|
|
| MD5 |
b5d8139c3e537f87ca5cbe56189d759e
|
|
| BLAKE2b-256 |
5f7399779b7bf016822392eee7eb58bc099103febd0f8d22d333e4f2281b32b6
|