I've a dataset of SMS records in PostgreSQL, where each record has a lat/lng and a timestamp in the format YY/MM/DD hh:mm:ss. What I would like to do, is create cluster(s) to highlight SMS messages that were sent close together both spatially and temporally. So far I have some SQL that can tell me which SMS messages are close spatially, but I am unsure how to incorporate the time element into this.
To find those spatially close, I've created a self join on the table to compare each point to every other point within a 0.005 degrees buffer.
How could I use Postgis/PoostgreSQL to look at the timestamp of each SMS and group them into what it thinks is 'close'.
I'm guessing the 'closeness' in time would need to be specified by the user, much like the buffer distance?
أكثر...
To find those spatially close, I've created a self join on the table to compare each point to every other point within a 0.005 degrees buffer.
How could I use Postgis/PoostgreSQL to look at the timestamp of each SMS and group them into what it thinks is 'close'.
I'm guessing the 'closeness' in time would need to be specified by the user, much like the buffer distance?
أكثر...