You are here: Home / LBN / Up2date / Data Science / BastionLinux 36 / python3-polyline-2.0.1-1.lbn36.noarch

python3-polyline-2.0.1-1.lbn36.noarch

Package Attributes
RPM  python3-polyline-2.0.1-1.lbn36.noarch.rpm Architecture  noarch Size  14506 Created  2024/01/21 13:51:26 UTC
Package Specification
Summary A Python implementation of Google's Encoded Polyline Algorithm Format.
Group Unspecified
License ZPL
Home Page https://pypi.org/project/polyline
Description

polyline is a Python implementation of Google’s Encoded Polyline Algorithm Format. It is essentially a port of Mapbox polyline with some additional features.

Installation polyline can be installed using pip: $ pip install polyline Starting from v2.0.0 only Python 3.7 and above is supported. For Python 2 support, please install v1.4.0: $ pip install polyline==1.4.0

API Documentation

Encoding To get the encoded polyline representation of a given set of (lat, lon) coordinates: import polyline polyline.encode([(38.5, -120.2), (40.7, -120.9), (43.2, -126.4)], 5) This should return _p~iF~ps|U_ulL~ugC_hgN~eq`@. You can set the required precision with the optional precision parameter. The default value is 5. You can encode (lon, lat) tuples by setting geojson=True.

Decoding To get a set of coordinates represented by a given encoded polyline string: import polyline polyline.decode(u{~vFvyys@fS], 5) This should return [(40.63179, -8.65708), (40.62855, -8.65693)] in (lat, lon) order. You

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(FileDigests)  
Provides
python-polyline
python3-polyline
python3.10-polyline
python3.10dist(polyline)
python3dist(polyline)
Obsoletes
python-polyline

Document Actions