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

Retrieve polylines with a precision of 6 #2485

Closed
FlowMo7 opened this issue May 28, 2016 · 5 comments
Closed

Retrieve polylines with a precision of 6 #2485

FlowMo7 opened this issue May 28, 2016 · 5 comments

Comments

@FlowMo7
Copy link

FlowMo7 commented May 28, 2016

I have noticed that in the current HTTP API (release v5.1.0) the polyline returned by e.g. the route service has a precision of 1e5.
I'm still running a server (version 4.7.1) which provides the polyline with a precision of 6.
Is there a parameter or any chance to get the polyline returned with a precision of 1e6 in the new version, or is the precision 'lost' at the extract / contract process?

I haven't found anything in the Wiki, and after serching the repository, the line 15 of the following file seems to make the precision hardcoded:
https:/Project-OSRM/osrm-backend/blob/807aa71a7c80b714b7a89db9c99c15720572ba25/include/engine/polyline_compressor.hpp

@danpat
Copy link
Member

danpat commented May 28, 2016

@Florian77711 We changed the default precision to 5 to match the default precision in Google's polyline.js library. Although it can be changed to 6, most people weren't, and we were fielding a constant stream of questions about it. We decided to switch to 5 just to stop the flood of problems. It also packs a bit smaller.

One way to approach this might be to support polyline6 as a separate type. I can understand the desire for 1e6 precision, but I can't think of many use-cases for anything beyond that (or less than 1e5).

@TheMarex thoughts? This could simplify (and speed up) some of our internal API code as well....

@TheMarex
Copy link
Member

I don't see a problem with offering polyline6 as well.

@thrownblown
Copy link

For what its worth, changing the include/engine/polyline_compressor.hpp back to 1e6 was a trivial change.
I just finished rebuilding and reparsing my planet files and everything works as expected. If anyone else is having this issue here's my fix:
thrownblown@244f0b0

@danpat
Copy link
Member

danpat commented Nov 7, 2016

This landed with PR #3220 , a new geometries=polyline6 option is available in master and should go out with the 5.5 tag when it happens.

@thrownblown
Copy link

Rad!

Alex Farioletti
415.312.1674
*tcbcourier.com http://tcbcourier.com *

On Mon, Nov 7, 2016 at 12:21 PM, Daniel Patterson [email protected]
wrote:

This landed with PR #3220
#3220 , a new
geometries=polyline6 option is available.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2485 (comment),
or mute the thread
https:/notifications/unsubscribe-auth/ADL7_A7zJB_GRMXddkz3ResAekrSmiXQks5q74gxgaJpZM4IpKMS
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants