News for hackers. Stuff that matters.
Re:Show HN: Valhalla, an open source routing engine by zzleeper on Thursday June 04, 2015 @04:39PM (#9661891)
A quick question: I have a list of 100+ million points with their geographical distance, but I want to improve it and calculate the "driving distance". How expensive in terms of time/ops would that be?

I'm scanning the different subprojects on Github and I think Tyr is the one I need, but I'm not entirely sure..

Re:Show HN: Valhalla, an open source routing engine by magila on Thursday June 04, 2015 @04:48PM (#9661945)
Are you a salesman by any chance?
Re:Show HN: Valhalla, an open source routing engine by zzleeper on Friday June 05, 2015 @02:16AM (#9664119)
Nah just trying to write a paper with GIS data..
Re:Show HN: Valhalla, an open source routing engine by Dewie3 on Thursday June 04, 2015 @05:16PM (#9662125)
Nah. Ebay already solved that problem.
Re:Show HN: Valhalla, an open source routing engine by hnyc on Thursday June 04, 2015 @11:36PM (#9663766)
Re:Show HN: Valhalla, an open source routing engine by Dewie3 on Friday June 05, 2015 @03:12PM (#9667452)
Heh, I liked it better when it was implied.
Re:Show HN: Valhalla, an open source routing engine by imaginenore on Thursday June 04, 2015 @05:03PM (#9662030)
I assume you want to calculate the driving distance from the user's location. So you pick something like 20-50 nearest points (a very cheap and quick operation with a geo-spatial index) and then you will calculate the driving distance to each of them using something like Valhalla, which is much more expensive, but it scales linearly and can be parallelized.

So the 100+ million number is irrelevant.

Re:Show HN: Valhalla, an open source routing engine by zzleeper on Friday June 05, 2015 @02:21AM (#9664131)
The problem is I have 5MM "users" through several years and I want to compute their distance to a set of points that change through time, so I do care a lot about speed.

Computing the geodesic distances was slow but not that slow because I used a variation of R* with some caching on top, but I still had to compute around 5MM distances or so.

Re:Show HN: Valhalla, an open source routing engine by imaginenore on Friday June 05, 2015 @06:30AM (#9664745)
How can computing geodesic distances be slow? Isn't it rather trivial math? I'm pretty sure 5 million of them can be calculated in a few seconds on my laptop. And it can be offloaded to the client.

Whereas route calculation can't be easily offloaded.

Re:Show HN: Valhalla, an open source routing engine by alpensiedler on Thursday June 04, 2015 @04:56PM (#9661989)
You sure can do this on your own machine. Have a look here for how to set this up on your own machine: https://github.com/valhalla/chef-valhalla/blob/master/README...
Re:Show HN: Valhalla, an open source routing engine by zzleeper on Friday June 05, 2015 @02:17AM (#9664121)
Thanks!!
Re:Show HN: Valhalla, an open source routing engine by karussell on Saturday June 06, 2015 @04:10PM (#9672087)
With Contraction Hierarchies you can get several hundred routes (or distances) per second. If you want to calculate distance matrices you can get a lot faster.