https://github.com/jagallup/encpoly
Python 3 library for encoding/decoding geographic coordinates using Google's Encoded Polyline Algorithm
https://github.com/jagallup/encpoly
polyline python
Last synced: 3 months ago
JSON representation
Python 3 library for encoding/decoding geographic coordinates using Google's Encoded Polyline Algorithm
- Host: GitHub
- URL: https://github.com/jagallup/encpoly
- Owner: JaGallup
- License: gpl-3.0
- Created: 2019-03-15T16:42:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-26T15:38:26.000Z (over 7 years ago)
- Last Synced: 2026-03-21T23:03:13.028Z (3 months ago)
- Topics: polyline, python
- Language: Python
- Homepage: https://encpoly.readthedocs.io/
- Size: 51.8 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
The `encpoly` package is a Python 3 library for fast, Pythonic manipulation of [encoded polylines][].
[![Build status][tci]][tcl]
[![Code coverage report][cci]][ccl]
[![Package on PyPI][ppi]][ppl]
```python
>>> from encpoly import encode, decode
>>> coords = ((38.5, -120.2), (40.7, -120.95), (43.252, -126.453))
>>> encode(coords)
'_p~iF~ps|U_ulLnnqC_mqNvxq`@'
>>> tuple(decode("_p~iF~ps|U_ulLnnqC_mqNvxq`@"))
([38.5, -120.2], [40.7, -120.95], [43.252, -126.453])
```
You can use Pip to install the [latest release][] from PyPi:
pip install encpoly
[encoded polylines]: https://developers.google.com/maps/documentation/utilities/polylinealgorithm
[tci]: https://travis-ci.org/JaGallup/encpoly.svg?branch=master
[tcl]: https://travis-ci.org/JaGallup/encpoly
[cci]: https://img.shields.io/codecov/c/github/JaGallup/encpoly.svg
[ccl]: https://codecov.io/gh/JaGallup/encpoly
[ppi]: https://img.shields.io/pypi/v/encpoly.svg
[ppl]: https://pypi.org/project/encpoly/
[latest release]: https://github.com/JaGallup/encpoly/releases