Skip to content

Add polyline encoding/decoding support #121

Description

@Vectorial1024

Currently, to construct Polyline instances, we need to iteratively provide specific coordinate points into the Polyline instance.

This works when the incoming data is presented in the format of very clear coordinates. However, there also exists a somewhat useful (string) format called Encoded Polyline Algorithm Format which can also be used to represent polylines.

The idea of encoded polylines are:

  • compression (see linked page; the 51-length polyline was compressed into 27-length string), which helps data transfer
  • convenience (no need to use GeoJSON)
  • standardized/common usage (e.g. used by OSRM, GraphHopper, MapBox, and perhaps more)

It is surprising to me that this library doesn't have a way to deal with encoded polylines.

How do you feel about this? If you feel this is a good thing to have, I can provide more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions