Lucene - Core
  1. Lucene - Core
  2. LUCENE-2366

LLRect.createBox returned box does not contains all points in (center,distance) disc

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      LLRect,createBox computation of a bouding box for a disc given center and distance doest not contains all the point in the distance.

      Example : the point north by distance doest not have Lat inferior of Lat of the UpperRight corner of the returned box

      1. LUCENE-2366.patch
        6 kB
        Nicolas Helleringer
      2. LUCENE-2366.patch
        5 kB
        Nicolas Helleringer
      3. LUCENE-2366.patch
        5 kB
        Nicolas Helleringer

        Activity

        Hide
        Grant Ingersoll added a comment -

        Committed revision 933754.

        Show
        Grant Ingersoll added a comment - Committed revision 933754.
        Hide
        Nicolas Helleringer added a comment -

        I reviewed the code as it still raise an error in the TestCartesian.testAntiM

        In fact the error is coming from

            double startX = beginAt - (beginAt %1);
            double startY = beginAt - startX ; //should give a whole number
            
            double endX = endAt - (endAt %1);
            double endY = endAt -endX; //should give a whole number
        

        @ CartesianPolyFilterBuilder.getShapeLoop : the double handling that should give a whole number does not.

        If you pass my version of LUCENE-2359 that does not rely on this code anymore everything is fine.

        Show
        Nicolas Helleringer added a comment - I reviewed the code as it still raise an error in the TestCartesian.testAntiM In fact the error is coming from double startX = beginAt - (beginAt %1); double startY = beginAt - startX ; //should give a whole number double endX = endAt - (endAt %1); double endY = endAt -endX; //should give a whole number @ CartesianPolyFilterBuilder.getShapeLoop : the double handling that should give a whole number does not. If you pass my version of LUCENE-2359 that does not rely on this code anymore everything is fine.
        Hide
        Nicolas Helleringer added a comment -

        Corrected a path problem in the patch file

        Show
        Nicolas Helleringer added a comment - Corrected a path problem in the patch file
        Hide
        Nicolas Helleringer added a comment -

        Ok found : was due to a lack of normalisation of FloatLatLong uppon construction ( I should fix this in a another patch)

        The new LUCENE-2366.patch pass the TestantiM test.

        ready to evaluate ! =)

        Show
        Nicolas Helleringer added a comment - Ok found : was due to a lack of normalisation of FloatLatLong uppon construction ( I should fix this in a another patch) The new LUCENE-2366 .patch pass the TestantiM test. ready to evaluate ! =)
        Hide
        Nicolas Helleringer added a comment -

        This patch solves LUCENE-2366 but create a regression in TestCartesian.testAntiM.

        I ll try to narrow it and fix it.

        Show
        Nicolas Helleringer added a comment - This patch solves LUCENE-2366 but create a regression in TestCartesian.testAntiM. I ll try to narrow it and fix it.
        Hide
        Nicolas Helleringer added a comment -

        I will work on this and have a patch very soon.

        Show
        Nicolas Helleringer added a comment - I will work on this and have a patch very soon.
        Hide
        Nicolas Helleringer added a comment -

        Test case for LLRect.createBox

        Show
        Nicolas Helleringer added a comment - Test case for LLRect.createBox

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicolas Helleringer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4h
              4h
              Remaining:
              Remaining Estimate - 4h
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development