Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevation Service Updates #2324

Merged
merged 6 commits into from
Apr 23, 2020
Merged

Elevation Service Updates #2324

merged 6 commits into from
Apr 23, 2020

Conversation

dnesbitt61
Copy link
Member

@dnesbitt61 dnesbitt61 commented Apr 16, 2020

Add support for polyline5 for height actions (both input and output encoded polylines). This makes it easier to replace competitor elevation services. Add height_precision to allow floating point heights to be returned (defaults to integer but allows 1 and 2 decimal point precision). This helps reduce "stair-step" patterns seen when charting elevation along mostly flat paths. Unit tests assume integer height values, so this is the default behavior.

Updated the API reference for elevation to include these changes.

Details:

  • Added height_precision input. Allows 0 (integer output, default), 1, or 2 (floating point decimal precision).
  • shape_format = polyline5 is now supported for encoded_polylines (input and output). This impacts elevation/height actions only (not map-matching), but defaults to polyline6 so if shape_format is not specified everything works as before.
  • Updated the elevation service API document.

Test JSON payload to validate polyline5 and height_precision inputs:

{"range":true,"encoded_polyline":"yivpFxfqoMcTcW_YaV","height_precision":2, "shape_format":"polyline5","resample_distance":30}

Issue

What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.

Tasklist

  • Add tests
  • Add #fixes with the issue number that this PR addresses
  • Generally use squash merge to rebase and clean comments before merging
  • Update the changelog

…ncoded

polylines). Add height_precision to allow floating point heights to be
returned (defaults to integer but allows 1 and 2 decimal point precision).
Updated the API reference for elevation to include these changes.
src/worker.cc Outdated Show resolved Hide resolved
@kevinkreiser
Copy link
Member

other than nitpicks looks fine to me. let me know if you think we should take care of them!

@kevinkreiser
Copy link
Member

@dnesbitt61 we should also have a changelog entry as well

@kevinkreiser kevinkreiser merged commit 467dcee into master Apr 23, 2020
@dnesbitt61 dnesbitt61 deleted the elevation_updates branch April 23, 2020 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants