Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
2.9, 2.9.1, 3.0
-
None
-
Patch Available
Description
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[] =
;
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.
Attachments
Attachments
Issue Links
- relates to
-
LUCENE-2139 Cleanup and Improvement of Spatial Contrib
- Closed