Skip to main content

Fast Google Polyline encoding and decoding using Rust FFI

Project description

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)

How it Works

FFI using ctypes and a Rust binary

License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pypolyline-0.1.4-py2.py3-none-win_amd64.whl (728.1 kB view hashes)

Uploaded Python 2 Python 3 Windows x86-64

pypolyline-0.1.4-py2.py3-none-win32.whl (787.6 kB view hashes)

Uploaded Python 2 Python 3 Windows x86

pypolyline-0.1.4-py2.py3-none-manylinux1_x86_64.whl (541.2 kB view hashes)

Uploaded Python 2 Python 3

pypolyline-0.1.4-py2.py3-none-macosx_10_6_intel.whl (667.5 kB view hashes)

Uploaded Python 2 Python 3 macOS 10.6+ intel

Supported by

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