Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 16719 invoked from network); 5 Apr 2010 15:17:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 15:17:51 -0000 Received: (qmail 40721 invoked by uid 500); 5 Apr 2010 15:17:50 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 40667 invoked by uid 500); 5 Apr 2010 15:17:50 -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 40580 invoked by uid 99); 5 Apr 2010 15:17:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 15:17:50 +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; Mon, 05 Apr 2010 15:17:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 649F7234C4B3 for ; Mon, 5 Apr 2010 15:17:27 +0000 (UTC) Message-ID: <1519887693.688791270480647411.JavaMail.jira@brutus.apache.org> Date: Mon, 5 Apr 2010 15:17:27 +0000 (UTC) From: "Nicolas Helleringer (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=3D128= 53399#action_12853399 ]=20 Nicolas Helleringer commented on LUCENE-1930: --------------------------------------------- No it is not. I ll make a updated one against current code base ASAP > 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, 2.9.1, 3.0 > Reporter: Nicolas Helleringer > Assignee: Chris Male > 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