You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Mark Nijhof <ma...@cre8ivethought.com> on 2014/08/06 16:09:39 UTC

Fwd: Group by functionality with time and GEO location data

Hi,

(I posted this earlier to dev but this seems the more appropriate place to
ask this question)

I would like to use CouchDB + GeoCouch to group and filter data by its date
and GEO location. For example I want to group events ordered by date that
are no further from each other then 10km. So:

01.07.14
- Event 1 - Malaga
- Event 2 - Benalmadena

01.07.14
- Event 3 - Granada

02.07.14
- Event 4 - Malaga

So I start a group by the first occurrence then add items to that group
until the events are more then 10km apart. A group can contain multiple
dates but should be broken up if an other event outside the group happens.
So even though Event 4 was near Event 1 and 2 it should be in its own group
because of where Event 3 was.

I hope I made myself clear :) and I sort of expect that this use-case might
be too custom. But if it isn't then it would be great to let the DB deal
with this. All though I imagine a pre-processing step is probably fastest
even if CouchDB can do it?

What would you advice?

Cheers,

-Mark

-- 
Mark Nijhof
t:   @MarkNijhof <https://twitter.com/MarkNijhof>
s:  marknijhof




-- 
Mark Nijhof
t:   @MarkNijhof <https://twitter.com/MarkNijhof>
s:  marknijhof