Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 20522 invoked from network); 1 Aug 2010 21:26:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Aug 2010 21:26:16 -0000 Received: (qmail 67146 invoked by uid 500); 1 Aug 2010 21:26:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 67083 invoked by uid 500); 1 Aug 2010 21:26:14 -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 67075 invoked by uid 99); 1 Aug 2010 21:26:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 21:26:14 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 21:26:09 +0000 Received: by fxm8 with SMTP id 8so1809627fxm.11 for ; Sun, 01 Aug 2010 14:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=RsPGj8Lw7mjwwJm2zX9HtgLI8AxwGSGBMGfAfQYVRhI=; b=I7OvlCTEu5EJccowV3fimnOhHpzau0SpQICxJAYUKTUG3w8zDxXdGJyRiMsQnLRn/u 8BXY5n58FyhZEZaILVV3foQY72qhG32t3Z67ImqEwkB/BLu3w6wIGaAuJAA/m6N/FGwL yNCICK/Z9Ar1TWNuDDs9r9PxpjNqGF6QxDUl8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sDX3Q4AM30trfwsuK9wkdd9g+EWthPOPTo9aAbFBNjetDFLNJTmRqQwTgwk9P5KWaF yLkUfTmw05UBEh6FQbOMwN9MAKIHN56/lbjPKqASk9vEpr0H3k8C9hv1rnIZxmXbSx+f qgYnAHyKjLeKh8qqgDu7v2BMR3aHX6dw22yrc= MIME-Version: 1.0 Received: by 10.239.187.144 with SMTP id l16mr161299hbh.186.1280697947334; Sun, 01 Aug 2010 14:25:47 -0700 (PDT) Received: by 10.239.187.196 with HTTP; Sun, 1 Aug 2010 14:25:47 -0700 (PDT) In-Reply-To: <4C55DF14.4020506@gmail.com> References: <4C5565C3.6060303@gmail.com> <4C55DC6E.5030401@gmail.com> <916A353F-41B1-402E-AECE-8D4C37EDD1A5@apache.org> <4C55DF14.4020506@gmail.com> Date: Sun, 1 Aug 2010 14:25:47 -0700 Message-ID: Subject: Re: geocouch: limit number of points in an area From: Randall Leeds To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Aug 1, 2010 at 13:54, Volker Mische wrote= : > On 01.08.2010 22:48, J Chris Anderson wrote: >> >> On Aug 1, 2010, at 1:43 PM, Volker Mische wrote: >> >>> On 01.08.2010 17:24, Benoit Chesneau wrote: >>>> >>>> On Sun, Aug 1, 2010 at 2:17 PM, Volker Mische >>>> wrote: >>>>> >>>>> On 01.08.2010 10:53, Benoit Chesneau wrote: >>>>>> >>>>>> I'm looking for a way to limit number of points retrieved for an are= a >>>>>> depending on its size. Ie When playing with the zoom on the map I wa= nt >>>>>> to be able to only display and retrieved only main points instead of >>>>>> all the points in this area. Is there a simple way to do that actual= ly >>>>>> ? >>>>>> >>>>>> - benoit >>>>> >>>>> Hi Benoit, >>>>> >>>>> there a two ways. Either introducing a "limit" parameter, but that's >>>>> probably not what you want. It would limit to a arbitrary selection >>>>> (not the >>>>> "main points" as you'd like to have it). >>>>> You probably want clusters. My suggestion is to do it on the client >>>>> side >>>>> with OpenLayers' cluster strategy [1][2]. >>>>> >>>>> [1] http://openlayers.org/dev/examples/strategy-cluster.html >>>>> [2] http://openlayers.org/dev/examples/strategy-cluster-threshold.htm= l >>>>> >>>>> Cheers, >>>>> =C2=A0Volker >>>>> >>>> This solution doesn't work when you have a lot of points though. Do >>>> you plan to add such things to geocouch ? >>>> >>> >>> Clustering isn't that easy. I think some layer on top of GeoCouch >>> should/will be built to handle such things. It can even be in any >>> programming language and communicate with GeoCouch via HTTP. >>> >> >> If there is a threshold that can be emitted with the points, maybe a _li= st >> function is the way to filter it server side. >> > > The problem is, that the points are potentially returned in random order.= So > you never know if there will be a point that is close to anther one at a > later stage. I think Chris was referring to a zoom threshold of sorts, which is independent of nearby points. R