Ask HN: What are some geospatial tools I can use to solve this problem?
I'm the tech lead on a new project that is out of my domain experience. At my company we have a fleet of drivers who checkin via an app with their lat/lng coordinates. We have pickup locations (whose locations are already known) and dropoff locations (whose locations are not known until an order is placed). We have a google maps for business license so we can query for directions with traffic durations and address to lat/lng. The key problems this service needs to solve are:
1) Given a new order, who will be the fastest driver to arrive at the pickup?
2) Use our own historical driver data to estimate drive times in the future.
3) Caching and solving similar problems
4) In general, using our own data so we are not just querying google for everything
So far I've looked at postgis, simple caching in redis, redis-geo, and solr spatial search. I'm just curious if anyone has any ideas on the topic. Thanks!
5 comments
[ 11.2 ms ] story [ 88.0 ms ] threadThe routing piece is the hardest. But if you don't have to do that then you just need something that stores groupings. For that matter if the points are a finite list that gets loaded as new then you don't even really need to store it as spatial data. Just list of drivers, destinations, times and you should be able to determine who gets where fastest.
looks like they had a further extension solving a very similar problem (Dial-a-ride-problem, DARP[1]) in their 1.x versions. I can't find it in their current docs, but it may be just an issue of how the reference it. Take a look through their stuff, it sounds like it'd be very helpful.
[0] - http://pgrouting.org/ [1] - http://gis.stackexchange.com/questions/5330/route-optimisati... (see first answer)
I believe SOLR can handle pretty fast indexing with soft commits, so latency of indexing new records shouldn't be an issue. Not sure about elastic search.
You can always pay Google
Google Distance Matrix: https://developers.google.com/maps/documentation/distancemat...