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

Remove geojson, go polyline only #3752

Closed
freenerd opened this issue Feb 27, 2017 · 4 comments
Closed

Remove geojson, go polyline only #3752

freenerd opened this issue Feb 27, 2017 · 4 comments

Comments

@freenerd
Copy link
Member

I think we should remove geojson responses and only go with polylines.

Arguments for removal:

  • Polylines are way faster to transfer, especially with big responses the cost of serializing and transferring geojson is huge.
  • There are easy to use polyline encoders available for all major platforms.
  • Removing parameter and code paths makes OSRM leaner and easier to develop.

Arguments against removal:

  • For developers to get started, Geojson is easier to work with than Polyline
  • There is confusion around the polyline coordinate order (it's lat,lon instead of the lon,lat we use everywhere. This is usually not a problem when developers use libraries for parsing the polyline.
  • There is confusion around polyline precision, but since we switched to the standard precision 5 this should be fine now.

/cc @TheMarex

@daniel-j-h
Copy link
Member

If you're concerned with response sizes and making OSRM leaner we should talk about

@gardster
Copy link
Contributor

gardster commented Mar 3, 2017

Hi. Please, do not remove GeoJSON support. I think, that you underestimate what this format means for other developers! I want to add several additional arguments, against removal:

  • MapBox quick visualization tool geojson.io supports only geoJSON. So it is hard to debug geometry in the response without it.
  • Many GIS application has native GeoJSON support instead of polyline (QGIS, JSOM and many others)
  • You can parse GeoJSON in python without additional libraries, and can not polyline.
  • OSRM server returns JSON encoded answer. It is logical to have a complete JSON response.

By the way. Where you switched to precision 5? I found only precision 6 in sources. https://github.com/Project-OSRM/osrm-backend/blob/master/include/util/coordinate.hpp#L43

@TheMarex
Copy link
Member

TheMarex commented Mar 3, 2017

@gardster internally everything is precision 6, but when we emit polyline we support the google format of precision 5. We also have polyline6 which gives you the full internal precision.

@daniel-j-h daniel-j-h added this to the 6.0 milestone Apr 24, 2017
@TheMarex TheMarex removed this from the 6.0 milestone Feb 1, 2018
@TheMarex
Copy link
Member

TheMarex commented Feb 1, 2018

I think GeoJSON is here to stay after all.

@TheMarex TheMarex closed this as completed Feb 1, 2018
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

No branches or pull requests

4 participants