Lucene - Core
  1. Lucene - Core
  2. LUCENE-6797

Geo3d circle construction could benefit from its own factory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      GeoCircles need special handling for whole-world situations and for single point situations. It would be better to have a factory that constructed appropriate instance types based on the parameters than try to fold everything into one class.

        Activity

        Hide
        Karl Wright added a comment - - edited

        Michael McCandless This patch performs the necessary class rearrangement, but doesn't handle the degenerate cases properly yet.

        Please note that I moved the GeoCircle.java class to GeoStandardCircle.java, and then created a new interface called GeoCircle.java. The patch may not therefore apply happily. I've also left a "nocommit" in the GeoCircleFactory class that will need to be addressed. But that is straightforward, and for now we can actually just go ahead and commit, I think, since any improvements will simply make the method "makeGeoCircle()" handle more cases.

        There should be no functional changes, just structural ones. Any questions please feel free to ask.

        Show
        Karl Wright added a comment - - edited Michael McCandless This patch performs the necessary class rearrangement, but doesn't handle the degenerate cases properly yet. Please note that I moved the GeoCircle.java class to GeoStandardCircle.java, and then created a new interface called GeoCircle.java. The patch may not therefore apply happily. I've also left a "nocommit" in the GeoCircleFactory class that will need to be addressed. But that is straightforward, and for now we can actually just go ahead and commit, I think, since any improvements will simply make the method "makeGeoCircle()" handle more cases. There should be no functional changes, just structural ones. Any questions please feel free to ask.
        Hide
        Michael McCandless added a comment -

        Thanks Karl Wright, I agree this is a rote refactor ... I'll commit shortly.

        Show
        Michael McCandless added a comment - Thanks Karl Wright , I agree this is a rote refactor ... I'll commit shortly.
        Hide
        ASF subversion and git services added a comment -

        Commit 1702328 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1702328 ]

        LUCENE-6797: use a factory to create GeoCircle

        Show
        ASF subversion and git services added a comment - Commit 1702328 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1702328 ] LUCENE-6797 : use a factory to create GeoCircle
        Hide
        ASF subversion and git services added a comment -

        Commit 1702329 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1702329 ]

        LUCENE-6797: use a factory to create GeoCircle

        Show
        ASF subversion and git services added a comment - Commit 1702329 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1702329 ] LUCENE-6797 : use a factory to create GeoCircle
        Hide
        Michael McCandless added a comment -

        Thanks Karl Wright!

        Show
        Michael McCandless added a comment - Thanks Karl Wright !

          People

          • Assignee:
            Unassigned
            Reporter:
            Karl Wright
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development