Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data storage advice needed: Best way to store location + time data?

I have a project in mind that will require the majority of queries to be keyed off of lat/long as well as date + time.

Initially, I was thinking of a standard RDBMS where lat, long, and the datetime field are properly indexed. Then, I began thinking of a document based system where the document was essentially a timestamp and each document has lat/long with in it. Each document could have n objects associated with it.

I'm looking for advice on what would be the best type of storage engine for this sort of thing is - which of the above idea would be better or if there is something else completely that is the ideal solution.

Edit: Looking for an open source/free solution. Unfortunately price is an issue!

Thanks

like image 389
mote Avatar asked Mar 14 '10 19:03

mote


2 Answers

I have used PostGres (free open source db) with PostGIS extensions for working with location data. They are extremely good, even though I was working in an MS environment with all production databases using MSSQL 2005, I used PostGres w/GIS to manipulate and precalculate a lot of geographic data.

PostGis has utilities for import arcview .shp files which is a huge plus since that's how most geographic data is present. It also provides a host of location based sql functions like contains( ... ) and near( ... ); and it provides a mechanism for indexing spatial data.

It's been awhile since I used it, but I remember it being rock solid and very useful.

PostGIS: http://postgis.refractions.net/

like image 136
vfilby Avatar answered Sep 21 '22 18:09

vfilby


SQL Server 2008 has new data types for storing and processing geographic information, in addition to the usual date and time types.

See "Working with Spatial Data (Database Engine)".

like image 20
John Saunders Avatar answered Sep 22 '22 18:09

John Saunders