lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1930) Scale moderator not in line with sinusoidal projector
Date Thu, 26 Nov 2009 13:43:39 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782896#action_12782896
] 

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 = projector.coords(latitude, longitude);
>   double id = getBoxId(coords[0]) + (getBoxId(coords[1]) / tierVerticalPosDivider);
>   return id ;
> }
> private double getBoxId (double coord){
>   return Math.floor(coord / (idd / this.tierLength));
> }
> with
> Double idd = new Double(180);
> in the CartesianTierPlotter constructor.
> But current Sinusoidal Projector set and used in initialisation of CartesianTierPlotter
does :
> public double[] coords(double latitude, double longitude) {
>   double rlat = Math.toRadians(latitude);
>   double rlong = Math.toRadians(longitude);
>   double nlat = rlong * Math.cos(rlat);
>   double r[] = {nlat, rlong};
> return r;
> }
> Thus we moderate with idd = 180 a coord that is in a Radian space.
> Things to do :
> 1°) fix idd to : double idd= PI;
> 2°) Move idd definition to IProjector interface : The coord space should belong to the
projector doing the job. Change the code from CTP to use that new interface.

-- 
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


Mime
View raw message