[
https://issues.apache.org/jira/browse/LUCENE-8587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16716492#comment-16716492
]
Ignacio Vera commented on LUCENE-8587:
--------------------------------------
I think the problems comes from how the testPoint is calculated:
{code:java}
/** Generate a point at the center of mass of a list of points.
*/
private static GeoPoint getCenterOfMass(final PlanetModel planetModel, final
List<GeoPoint> points) {
double x = 0;
double y = 0;
double z = 0;
//get center of mass
for (final GeoPoint point : points) {
x += point.x;
y += point.y;
z += point.z;
}
// Normalization is not needed because createSurfacePoint does the scaling
anyway.
return planetModel.createSurfacePoint(x, y, z);
}{code}
Maybe we should build the point here using the equivalent [lat, lon]?
[[email protected]]
> Self comparison bug in GeoComplexPolygon.equals method
> ------------------------------------------------------
>
> Key: LUCENE-8587
> URL: https://issues.apache.org/jira/browse/LUCENE-8587
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial3d
> Affects Versions: 7.1
> Reporter: Zsolt Gyulavari
> Priority: Major
> Attachments: LUCENE-8587.patch
>
>
> GeoComplexPolygon.equals method checks equality with own testPoint1 field
> instead of the other.testPoint1.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]