Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 90C241063F for ; Thu, 12 Dec 2013 14:26:38 +0000 (UTC) Received: (qmail 70948 invoked by uid 500); 12 Dec 2013 14:26:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 70912 invoked by uid 500); 12 Dec 2013 14:26:35 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 70904 invoked by uid 99); 12 Dec 2013 14:26:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 14:26:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.213.42] (HELO mail-yh0-f42.google.com) (209.85.213.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 14:26:29 +0000 Received: by mail-yh0-f42.google.com with SMTP id z6so335500yhz.1 for ; Thu, 12 Dec 2013 06:26:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=vHyyXA7eODImbz0dth/WgvqcVvJfJhHB0pF+S5pUjTA=; b=T0oXMmSKyOqQs+L0WH+HGCAowBdh6MaGuO95BV+ndHEHZUHsFVLxKXs0UgR2ehRX+z DBQfTTkYOshaHLw5kqjXbaln7FGPIBxhYst6PfxYUPPsHhBlqU+HPbMX3cY2qEeOs6ux ae8mX+t1+rt8vNOcSNgU6gnjj3FCUX0HxSv1ki/HqlUnaQtFRgDiKn/mAYSBObDsX4hG rQVA7tTC3IEOZ+u1JVy31yRuMxNvLCx58SyPcNgOKnEUYKk3yIH9bxTkb7HnipTRID2c lhu6F+OVaD5VTY6iDFUkLAatxRWNGGpSrG1QjGPftM5hi2eiMwnWJxFYaliBiwiRawYc 7RKA== X-Gm-Message-State: ALoCoQmR+iEz8ixlkoU5IrMpefagGdfY5iQ2PRCFFT26WQM2Ep/6qB81G7MoA3ctXL/l19pKh49E X-Received: by 10.236.188.232 with SMTP id a68mr6030559yhn.8.1386858364285; Thu, 12 Dec 2013 06:26:04 -0800 (PST) Received: from [192.168.11.13] (c-68-37-177-195.hsd1.nj.comcast.net. [68.37.177.195]) by mx.google.com with ESMTPSA id m68sm34131797yhj.22.2013.12.12.06.26.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 06:26:03 -0800 (PST) Message-ID: <52A9C77A.4090903@orgmeta.com> Date: Thu, 12 Dec 2013 09:26:02 -0500 From: Vivek Pathak User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: use startkey/endkey to discribe a range problem References: <52A4955E.80905@gmail.com> <52A49895.5030603@orgmeta.com> <5edc7288-262f-4a5c-be18-4f9fd6c08b6a@email.android.com> <52A92747.2090606@orgmeta.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks The code is apache 2 licensed - but is in a fork on githib with a colleague. Let me get you a link to it over the next few days. Thanks Vivek 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 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. >>> 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 >>> >>> -- >>> ,,,^..^,,, >>> >>>