Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Geometry encoding #34

Merged
merged 4 commits into from
Oct 22, 2015
Merged

Geometry encoding #34

merged 4 commits into from
Oct 22, 2015

Conversation

perrygeo
Copy link
Contributor

Resolves #32 - see comments there for initial discussion. The main advantage to this approach is that all API wrappers which require geometries as input can accept common python vector data structures.

This PR adds an encoding module providing a few useful functions, mainly encode_waypoints and encode_polyline which take iterables of feature-like objects and return data fit for posting to mapbox APIs.

There is a dependency on polyline which is a nice Python2/3 port of mapbox/polyline. The other option (gpolyencode) is not Python 3 compatible and doesn't give results consistent with mapbox/polyline (see gist)

sgillies added a commit that referenced this pull request Oct 22, 2015
@sgillies sgillies merged commit 0ecd094 into master Oct 22, 2015
@sgillies sgillies deleted the geom_encoding branch October 22, 2015 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants