Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8071

GeoExactCircle should create circles with right number of planes

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.7, 7.2, 8.0
    • modules/spatial3d
    • None
    • New

    Description

      Hi kwright@metacarta.com,

      There is still a situation when the test can fail. It happens when the planet model is a SPHERE and the radius is slightly lower than PI. The circle is created with two sectors but the circle plane is too big and the shape is bogus.

      I will attach a test and a proposed solution. (I hope this is the last issue of this saga)

      Attachments

        1. LUCENE-8071-test.patch
          1 kB
          Ignacio Vera
        2. LUCENE-8071.patch
          8 kB
          Ignacio Vera
        3. testPointsWithIn.patch
          2 kB
          Ignacio Vera

        Activity

          ivera Ignacio Vera added a comment -

          Attached the test and proposed solution.

          I basically force the shape to create at least 4 sectors if the radius is big. I have realized as well that the shape has always a minimum of two sectors. Therefore there is a lot of code that can be removed as it is checking for number of sectors lower than 2.

          ivera Ignacio Vera added a comment - Attached the test and proposed solution. I basically force the shape to create at least 4 sectors if the radius is big. I have realized as well that the shape has always a minimum of two sectors. Therefore there is a lot of code that can be removed as it is checking for number of sectors lower than 2.
          kwright@metacarta.com Karl Wright added a comment -

          Hi ivera, this would have been addressed by the backing planes too.
          Essentially, when the circle becomes concave, the logic has to change for computing "within". That is the fundamental difference.

          I think the fix is reasonable although I am not certain there aren't other cases besides the initial split where this same logic would be needed.

          kwright@metacarta.com Karl Wright added a comment - Hi ivera , this would have been addressed by the backing planes too. Essentially, when the circle becomes concave, the logic has to change for computing "within". That is the fundamental difference. I think the fix is reasonable although I am not certain there aren't other cases besides the initial split where this same logic would be needed.

          Commit 6c3869f8b1932cef7e13ebc91fe3b04532215ea5 in lucene-solr's branch refs/heads/master from kwright@metacarta.com
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6c3869f ]

          LUCENE-8071: Handle large concave circles properly. Committed on behalf of Ignacio Vera.

          jira-bot ASF subversion and git services added a comment - Commit 6c3869f8b1932cef7e13ebc91fe3b04532215ea5 in lucene-solr's branch refs/heads/master from kwright@metacarta.com [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6c3869f ] LUCENE-8071 : Handle large concave circles properly. Committed on behalf of Ignacio Vera.

          Commit 1f1d7a326de28326a841229ace3519babba462f2 in lucene-solr's branch refs/heads/branch_6x from kwright@metacarta.com
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1f1d7a3 ]

          LUCENE-8071: Handle large concave circles properly. Committed on behalf of Ignacio Vera.

          jira-bot ASF subversion and git services added a comment - Commit 1f1d7a326de28326a841229ace3519babba462f2 in lucene-solr's branch refs/heads/branch_6x from kwright@metacarta.com [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1f1d7a3 ] LUCENE-8071 : Handle large concave circles properly. Committed on behalf of Ignacio Vera.

          Commit 80930b97ccbd5932f08727f4cdb15208a015c064 in lucene-solr's branch refs/heads/branch_7x from kwright@metacarta.com
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=80930b9 ]

          LUCENE-8071: Handle large concave circles properly. Committed on behalf of Ignacio Vera.

          jira-bot ASF subversion and git services added a comment - Commit 80930b97ccbd5932f08727f4cdb15208a015c064 in lucene-solr's branch refs/heads/branch_7x from kwright@metacarta.com [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=80930b9 ] LUCENE-8071 : Handle large concave circles properly. Committed on behalf of Ignacio Vera.
          ivera Ignacio Vera added a comment - - edited

          Thanks for committing karl wright,

          Fair to say that the shape only supports planets which are slightly elongated like WGS84 (~abs(flattening)<0.05).

          I attach the test I am using to check the shape in case you think it is useful. I will move this shape to the spatial4j wrapper if it is ok with you.

          ivera Ignacio Vera added a comment - - edited Thanks for committing karl wright , Fair to say that the shape only supports planets which are slightly elongated like WGS84 (~abs(flattening)<0.05). I attach the test I am using to check the shape in case you think it is useful. I will move this shape to the spatial4j wrapper if it is ok with you.
          tomoko Tomoko Uchida added a comment -

          This issue was moved to GitHub issue: #9119.

          tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #9119 .

          People

            kwright@metacarta.com Karl Wright
            ivera Ignacio Vera
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: