incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Pathak <vpat...@orgmeta.com>
Subject Re: use startkey/endkey to discribe a range problem
Date Sat, 14 Dec 2013 10:40:44 GMT

Hi

Here is the link to the code.

https://github.com/SocialFarm/SocialFarm/blob/3d418fb400bd921e09f87a449270af83e7cfb030/db/info/shows/create_job.html#L246

Thanks

On 12/12/2013 02:55 AM, Dave Cottlehuber wrote:
> Vivek,
>
> This approach sounds really interesting.
>
> Are you able to share a small example? Link to working code would be  a
> bonus!
>
> Also, geocouch is hardly experimental these days, it's at least 2 years old
> and has been well used.
>
> A+
> Dave
>
>
>
> On 12 December 2013 04:02, Vivek Pathak <vpathak@orgmeta.com> wrote:
>
>> Hi
>>
>> I have been using this approach successfully via a view.  The view emits
>> the geokey based on latitude and longitude of the document (document has a
>> location).
>>
>> The idea is to traverse the view in ascending and descending orders - from
>> a start key corresponding to center of bounding box - and to get sufficient
>> number of "candidates".  Then filter out what is not needed (eg: must be
>> within a given shape etc.)
>>
>> I believe using both ascending and descending should solve the 00 and 20
>> problem you state below.
>>
>> My best wishes for the geo couch enhancement.  No reason why it couldnt be
>> k dimensional as well...
>>
>> I just mentioned my approach since it is a common misconception that
>> multidimensional can not be efficiently mapped to single dimension. I found
>> the solution to work very well, and it is conceptually simple also.
>>
>> Thanks
>> Vivek
>>
>>
>>
>> On 12/11/2013 02:22 PM, Alexander Shorin wrote:
>>
>>> On Wed, Dec 11, 2013 at 11:16 PM, Florian Westreicher Bakk.techn.
>>> <stuff@meredrica.org> wrote:
>>>
>>>> That's an interesting idea but it will not work in all situations. You
>>>> could not query for areas that span multiple quadrants. If you would like
>>>> to get all locations around 0,0 in a 20km square this won't work.
>>>>
>>> This task looks suitable for GeoCouch extension:
>>> https://github.com/couchbase/geocouch
>>>
>>> --
>>> ,,,^..^,,,
>>>
>>>


Mime
View raw message