Skip to content

Adds support for polyline6#287

Merged
cammace merged 3 commits into
masterfrom
cam-routeutils-refactor
Feb 9, 2017
Merged

Adds support for polyline6#287
cammace merged 3 commits into
masterfrom
cam-routeutils-refactor

Conversation

@cammace

@cammace cammace commented Jan 24, 2017

Copy link
Copy Markdown

Closes #207
Closes #288

Bring over the work done in #228 and completes it.

@mention-bot

Copy link
Copy Markdown

@cammace, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zugaldia and @ahuang13 to be potential reviewers.

@cammace cammace added this to the v2.0.0 milestone Jan 24, 2017
@cammace cammace changed the title Route Utils refactor Route Utils refactor and adds support for polyline6 Jan 25, 2017
@zugaldia

Copy link
Copy Markdown
Member

@cammace Should we close #228 then?

@cammace cammace force-pushed the cam-routeutils-refactor branch from c6cfd41 to 011ae58 Compare February 8, 2017 16:35
@cammace cammace changed the title Route Utils refactor and adds support for polyline6 Adds support for polyline6 Feb 8, 2017
@cammace

cammace commented Feb 8, 2017

Copy link
Copy Markdown
Author

I've fixed up this PR to only add support for precision 6 in the directions api. The route utils refactor will come laster down the road but I don't expect it to break the API.

@zugaldia zugaldia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small changes.

public static final int GOOGLE_PRECISION = 5;
public static final int OSRM_PRECISION_V4 = 6;
public static final int OSRM_PRECISION_V5 = 5;
public static final int OSRM_PRECISION_6_V5 = 6;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cammace Let's not do this, let's use PRECISION_6 from #312 instead.

// If we need the corresponding LineString object, this SDK can do the decoding with
// LineString.fromPolyline(String polyline, int precision).
// by defauly the geometry is polyline with precision 5.
this.geometries = DirectionsCriteria.GEOMETRY_POLYLINE;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cammace Let's default to precision 6. That's what I do on MapMatching and the payload isn't much bigger but there's a gain in precision.

@cammace cammace force-pushed the cam-routeutils-refactor branch from 008183e to f28d5aa Compare February 8, 2017 18:38
@cammace cammace merged commit 083b5c0 into master Feb 9, 2017
@cammace cammace deleted the cam-routeutils-refactor branch February 9, 2017 14:24
@zugaldia zugaldia mentioned this pull request Feb 10, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Feb 22, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Mar 9, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Mar 17, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants