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

Fix geojson Position element issue (3rd element) #5608

Merged
merged 1 commit into from
Nov 13, 2017

Conversation

oguiter
Copy link
Contributor

@oguiter oguiter commented Nov 7, 2017

Following RFC 7946, position is an array of number with two OR MORE
elements (Implementations SHOULD NOT extend positions beyond three
elements). The 3rd element is usually Altitude. We could ignore it
but we must not fail.
This small fix allows well-formed geojson file to be fully processed

Signed-off-by: Olivier Guiter oguiter@free.fr

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

@oguiter oguiter changed the title Fix geojson Pposition element issue (3rd element) Fix geojson Position element issue (3rd element) Nov 7, 2017
@jfirebaugh
Copy link
Contributor

Thanks @oguiter! Could you please add a test for this?

oguiter added a commit to oguiter/mapbox-gl-js that referenced this pull request Nov 7, 2017
Test LatLng convert on GeoJSON Position with Elevation

Signed-off-by: Olivier Guiter <oguiter@free.fr>
@oguiter
Copy link
Contributor Author

oguiter commented Nov 7, 2017

Hi @jfirebaugh,
Tests added... feel free to change anything :)

oguiter added a commit to oguiter/mapbox-gl-js that referenced this pull request Nov 8, 2017
Test LatLng convert on GeoJSON Position with Elevation

Signed-off-by: Olivier Guiter <oguiter@free.fr>
Following RFC 7946, position is an array of number with two OR MORE
elements (Implementations SHOULD NOT extend positions beyond three
elements). The 3rd element is usually Altitude. We could ignore it
but we must not fail.
This small fix allows well-formed geojson file to be fully processed

Signed-off-by: Olivier Guiter <oguiter@free.fr>
Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

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

Thanks!

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