[
https://issues.apache.org/jira/browse/LUCENE-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856929#action_12856929
]
Nicolas Helleringer commented on LUCENE-2359:
---------------------------------------------
What my code do :
It looks how many times you can fit the search diameter (2.0d * range) into the
distance that will be split into longitudes range (I-e
distanceUnit.earthCircumference()).
And then it takes the first biggest level of Tier that will have a range just
above the search diameter (int bestFit = (int) Math.ceil(log2(times));)
This way you ll have the better comprise betwenn fetching the less number of
boxes and not fetching too big boxes with too many documents in them.
> CartesianPolyFilterBuilder doesn't handle edge case around the 180 meridian
> ---------------------------------------------------------------------------
>
> Key: LUCENE-2359
> URL: https://issues.apache.org/jira/browse/LUCENE-2359
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/spatial
> Affects Versions: 2.9, 2.9.1, 2.9.2, 3.0, 3.0.1
> Reporter: Grant Ingersoll
> Assignee: Grant Ingersoll
> Priority: Minor
> Attachments: LUCENE-2359.patch, LUCENE-2359.patch, LUCENE-2359.patch,
> TEST-2359.patch
>
>
> Test case:
> Points all around the globe, plus two points at 0, 179.9 and 0,-179.9 (on
> each side of the meridian). Then, do a Cartesian Tier filter on a point
> right near those two. It will return all the points when it should just
> return those two.
> The flawed logic is in the else clause below:
> {code}
> if (longX2 != 0.0) {
> //We are around the prime meridian
> if (longX == 0.0) {
> longX = longX2;
> longY = 0.0;
> shape = getShapeLoop(shape,ctp,latX,longX,latY,longY);
> } else {//we are around the 180th longitude
> longX = longX2;
> longY = -180.0;
> shape = getShapeLoop(shape,ctp,latY,longY,latX,longX);
> }
> {code}
> Basically, the Y and X values are transposed. This currently says go from
> longY (-180) all the way around to longX which is the lower left longitude
> of the box formed. Instead, it should go from the lower left long to -180.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]