You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nicolas Helleringer (JIRA)" <ji...@apache.org> on 2009/09/28 11:34:16 UTC
[jira] Created: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
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
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
[jira] Updated: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Helleringer updated LUCENE-1930:
----------------------------------------
Attachment: LUCENE-1930.patch
Here is the full patch with the two ranges for latitude and longitude.
Tests OK.
> 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
[jira] Assigned: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Chris Male (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male reassigned LUCENE-1930:
----------------------------------
Assignee: Chris Male
> 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 = 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760272#action_12760272 ]
Nicolas Helleringer commented on LUCENE-1930:
---------------------------------------------
Further more there should be 2 ranges, one for Latitude and one for Longitude as the space for Latitude is [-PI/2;PI/2] and for Longitude is [-PI;PI] in Radians.
> 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
>
> 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761202#action_12761202 ]
Nicolas Helleringer commented on LUCENE-1930:
---------------------------------------------
Would be pleased to =)
Chris ? what is your status ?
> 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
[jira] Updated: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Helleringer updated LUCENE-1930:
----------------------------------------
Lucene Fields: [Patch Available] (was: [New])
Affects Version/s: 2.9.1
3.0
> 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
> 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Chris Male (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853395#action_12853395 ]
Chris Male commented on LUCENE-1930:
------------------------------------
Nicolas,
Is this patch contained in one of your other issues? If so, I'd like to close this one up to prevent confusion.
> 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 = 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782872#action_12782872 ]
Nicolas Helleringer commented on LUCENE-1930:
---------------------------------------------
As Chris work is being released outside Lucene Apache project (http://www.jteam.nl/news/spatialsolr), should we consider this patch to be re evaluated to commit ?
> 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782908#action_12782908 ]
Nicolas Helleringer commented on LUCENE-1930:
---------------------------------------------
Ok ! I did not get that =)
Of course : add a comment to the issue to tell the project.
Best regards,
Nicolas
> 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761198#action_12761198 ]
Michael McCandless commented on LUCENE-1930:
--------------------------------------------
Note that there is something of a rework pending on contrib/spatial -- see http://lucene.markmail.org/message/4gaajqmhuxpwla7c -- maybe sync up w/ Chris to make sure this patch and his work fit together?
> 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Nicolas Helleringer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853399#action_12853399 ]
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 = 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
[jira] Commented: (LUCENE-1930) Scale moderator not in line with
sinusoidal projector
Posted by "Chris Male (JIRA)" <ji...@apache.org>.
[ 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