[
https://issues.apache.org/jira/browse/LUCENE-6597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14600823#comment-14600823
]
Karl Wright commented on LUCENE-6597:
-------------------------------------
bq. What do you think about adding support for zero radius? Might as well;
right? I started to do this to see what happens. First I needed to relax the
arg check in the GeoCircle constructor. But then I found the
SidedPlane.constructNormalizedPerpendicularSidedPlane returned null.
Yes, exactly.
While the whole-globe degenerate case is in fact useful and might be
realistically encountered, and used to work before the WGS84 implementation,
I've basically shied away from the none-of-the-globe or single-point side of
things. GeoPath, GeoConvexPolygon, and GeoCircle all have potential single
point solutions. I *did* add a degenerate point object for GeoBBoxes but only
because I did not trust spatial4j to not generate such a thing algorithmically.
But otherwise I would have resisted.
If you believe it is critical to address this omission, you can either add a
"tangent plane to a point" sided plane constructor, or a boolean that would be
true for the special case. But, as I said, many other shapes would then
probably need to be looked at too. Really a lot of work for zero benefit.
bq. I noticed GeoCircle computes the cosign of the cutoffAngle but doesn't use
it.
If unused then we shouldn't compute it. Feel free to get rid of it, or if you
prefer, I will.
bq. The IllegalArgumentException loop in
Geo3dShapeRectRelationTestCase.testGeoCircleRect can now be removed, it appears.
Only if you take the correct steps to allow degenerate single-point circles.
Just accepting a null circlePlane is *not* that step, since that currently
would represent a whole-world circle, not a zero-world circle.
> Geo3d circle creation that covers whole globe throws an
> IllegalArgumentException
> --------------------------------------------------------------------------------
>
> Key: LUCENE-6597
> URL: https://issues.apache.org/jira/browse/LUCENE-6597
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial
> Reporter: Karl Wright
> Attachments: LUCENE-6597.patch
>
>
> The following GeoCircle construction:
> {code}
> new GeoCircle(PlanetModel.SPHERE, -20.0 * RADIANS_PER_DEGREE, -20.0 *
> RADIANS_PER_DEGREE, Math.PI);
> {code}
> ... fails as follows:
> {code}
> Degenerate/parallel vector constructed
> {code}
> The reason is that the plane normal vector cannot be computed in that case.
> A special case is warranted for circles that cover the whole globe.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]