Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
here-polyline-converter
Advanced tools
A tool to convert strings between HERE Flexible Polyline format and the (now legacy) format used in HERE Places API
A tool to encode/decode HERE legacy polyline strings and convert them from/into HERE Flexible Polyline format.
Note that the HERE Places (Search) API is in maintenance: Developers need to adapt their applications to the newer HERE Geocoding & Search API to benefit from the features developed after 2018.
pip install here-polyline-converter
>>> convert_legacy_to_flex(legacy_polyline_string)
Transforms a HERE legacy polyline string into a flexible polyline string. The legacy Polyline third dimension (segments width changes) is ignored.
>>> encode_legacy(iterable)
Encodes a list of coordinates to the corresponding HERE legacy polyline string representation.
Expected coordinates order: (lat, lng[, width])
. Note that width
is expected to be one of DW
, HW
, CW
.
>>> decode_legacy(legacy_polyline_string)
Decodes a HERE legacy polyline string into an array of coordinates (lat, lng[, width])
.
Note that width
is expected to be one of DW
, HW
, CW
.
>>> import here_search.polyline_converter as pc
>>> legacy_polyline = "oz5xJ67i1B1B7PzIhaxL7Y"
>>> flexible_polyline = pc.convert_legacy_to_flex(legacy_polyline)
>>> flexible_polyline
'BFoz5xJ67i1B1B7PzIhaxL7Y'
>>> points = [(50.1022829, 8.6982122), (50.1020076, 8.6956695), (50.1006313, 8.6914960), (50.0987800, 8.6875156)]
>>> pc.encode_legacy(points)
'oz5xJ67i1B1B7PzIhaxL7Y'
>>> legacy_polyline = "oz5xJ67i1B.C1B7PzIha.DxL7Y"
>>> pc.decode_legacy(legacy_polyline)
[(50.10228, 8.69821, 'CW'), (50.10201, 8.69567), (50.10063, 8.6915, 'DW'), (50.09878, 8.68752)]
Copyright (C) 2023 HERE Europe B.V.
See the LICENSE file in the root of this project for license details.
FAQs
A tool to convert strings between HERE Flexible Polyline format and the (now legacy) format used in HERE Places API
We found that here-polyline-converter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.