Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which db for gps based tracking

I am confused between using a generic graph database (neo4j) to mongodb for tracking gps devices.

Functionality I require :

  • Track and profile the path of each tracked device.
  • Lat long / address based searching for devices
  • Traffic estimation based on aggregated data from all devices
  • Some more intelligent stuff for which I will implement the algorithms.
  • Should have a stable interface to Nodejs

Any suggestions ?

Some answers here suggest to use a GIS database, some suggest graph , Can someone clarify the difference ?

NoSQL and spatial data

like image 748
srinathhs Avatar asked Jun 20 '12 05:06

srinathhs


3 Answers

I would suggest an object relational database as opposed to a no-sql database such as mongo, because it sounds like your data analysis will be utilizing a lot of the relational features that mongo excludes.

Per your specifications I would suggest PostgreSQL with the PostGis plugin. PostGIS is a spatial database add-on for the PostgreSQL relational database server. It includes support for all of the functions and objects defined in the OpenGIS “Simple Features for SQL” specification. Using the many spatial functions in PostGIS, it is possible to do advanced spatial processing and querying entirely at the SQL command-line.

like image 70
just eric Avatar answered Nov 20 '22 05:11

just eric


You might want to have a look at geocouch extension for couchdb which supports spacial information along with bounding box queries. Obviously, you can add you're own views with map reduce functions for your specific use cases.

My use case was a bit different but involved storing GPS coordinate every 5 minutes for a duration of about 3 weeks almost none stop over 6000 Km. I had custom views to compute distances, mean speed, etc along with list function to output itineraries in KML format and such. A web interface was also provided to track the current location in real-time. No problem whatsoever with CouchDB.

As for a client library for node, I've been using cradle for some projects and I'm pleased with the stability and easy of use. Just make sure you're not caching in development while changing the views and all.

like image 32
pdeschen Avatar answered Nov 20 '22 05:11

pdeschen


Considering the specific implementation decided to go with mongodb + postgis configuration.

like image 3
srinathhs Avatar answered Nov 20 '22 05:11

srinathhs