Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 91334 invoked from network); 26 Nov 2009 13:44:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Nov 2009 13:44:04 -0000 Received: (qmail 13074 invoked by uid 500); 26 Nov 2009 13:44:03 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 13006 invoked by uid 500); 26 Nov 2009 13:44:03 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 12996 invoked by uid 99); 26 Nov 2009 13:44:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2009 13:44:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2009 13:44:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8B44A234C04C for ; Thu, 26 Nov 2009 05:43:39 -0800 (PST) Message-ID: <978163455.1259243019555.JavaMail.jira@brutus> Date: Thu, 26 Nov 2009 13:43:39 +0000 (UTC) From: "Chris Male (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1930) Scale moderator not in line with sinusoidal projector In-Reply-To: <1415403468.1254130456101.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1930?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D127= 82896#action_12782896 ]=20 Chris Male commented on LUCENE-1930: ------------------------------------ Hi Nicolas, I have every intention to commit my work to Lucene in the next week or so. = If you can wait till then, I will include this patch in my patch. Thanks > Scale moderator not in line with sinusoidal projector > ----------------------------------------------------- > > Key: LUCENE-1930 > URL: https://issues.apache.org/jira/browse/LUCENE-1930 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/spatial > Affects Versions: 2.9 > Reporter: Nicolas Helleringer > Attachments: LUCENE-1930.patch > > > Current implementation in spatial Lucene does : > public double getTierBoxId (double latitude, double longitude) { > double[] coords =3D projector.coords(latitude, longitude); > double id =3D getBoxId(coords[0]) + (getBoxId(coords[1]) / tierVertical= PosDivider); > return id ; > } > private double getBoxId (double coord){ > return Math.floor(coord / (idd / this.tierLength)); > } > with > Double idd =3D new Double(180); > in the CartesianTierPlotter constructor. > But current Sinusoidal Projector set and used in initialisation of Cartes= ianTierPlotter does : > public double[] coords(double latitude, double longitude) { > double rlat =3D Math.toRadians(latitude); > double rlong =3D Math.toRadians(longitude); > double nlat =3D rlong * Math.cos(rlat); > double r[] =3D {nlat, rlong}; > return r; > } > Thus we moderate with idd =3D 180 a coord that is in a Radian space. > Things to do : > 1=C2=B0) fix idd to : double idd=3D PI; > 2=C2=B0) Move idd definition to IProjector interface : The coord space sh= ould belong to the projector doing the job. Change the code from CTP to use= that new interface. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org