Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are some geospatial tools I can use to solve this problem?
2 points by gnikflow on April 18, 2015 | hide | past | favorite | 5 comments
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!




pgRouting[0] is an extension for PostGIS that provides some routing functions.

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)


If you want to do it in-house, you can geocode the customer addresses through geocoder (using Google's API) and use SOLR or elastic search to store the latitude and longitude, then do geospatial queries with all the drivers' current coordinates to find the closest driver.

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...


Postgis probably easiest/best overall. You don't need to do routing or TSM? In a native form for one use spatialite works.

The 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.


osm


OSM if you mean open street map is just display. Osrm-- open street routing might work if you need routing. But postgis has routing modules and you could call Google for the routes and store.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: