Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
encode
✓ from flexpolyline import encode
decode
✓ from flexpolyline import decode
Basic usage: encode a list of coordinate tuples, decode back.
from flexpolyline import encode, decode
# Coordinates as list of (lat, lon) pairs
coordinates = [(52.5, 13.35), (52.515, 13.36), (52.520, 13.37)]
# Encode with default precision (5) and 2D (third dimension none)
encoded = encode(coordinates)
print(encoded) # e.g., 'BF05xgKuy7lB8s7B'
# Decode back to coordinates
decoded = decode(encoded)
print(decoded) # [(52.5, 13.35), (52.515, 13.36), (52.520, 13.37)]
Errors
Common errors & fixes
ValueError: Unknown third dimension value: 3
The third_dim parameter must be 0 (none), 1 (elevation), or 2 (elevation and extrude).
fixUse allowed values: third_dim=0, third_dim=1, or third_dim=2.
TypeError: a float is required
Coordinates contain non-numeric values or are not in the correct format.
fixEnsure all coordinate values are floats and input is a list of tuples of numbers.
flexpolyline._flexpolyline.PolylineDecoderError: Invalid character in input
The encoded string contains invalid characters (e.g., spaces, special symbols).
fixPass only the valid encoded polyline string; remove whitespace or unexpected characters.
Upgrade
Version history
0.1.0latest on PyPI · released Nov 21, 2020
Audit
Dependencies
No dependency data recorded yet.