You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ignacio Vera (JIRA)" <ji...@apache.org> on 2017/07/18 11:28:00 UTC
[jira] [Created] (LUCENE-7909) Issue with holes in polygons
Ignacio Vera created LUCENE-7909:
------------------------------------
Summary: Issue with holes in polygons
Key: LUCENE-7909
URL: https://issues.apache.org/jira/browse/LUCENE-7909
Project: Lucene - Core
Issue Type: Bug
Components: modules/spatial3d
Reporter: Ignacio Vera
Hi,
It seems the behavior of adding holes to polygons is not behaving well. It seems it is all related to the following method:
/** Check if a point is within the provided holes.
*@param point point to check.
*@return true if the point is within any of the holes.
*/
protected boolean isWithinHoles(final GeoPoint point) {
if (holes != null) {
for (final GeoPolygon hole : holes) {
if (!hole.isWithin(point)) {
return true;
}
}
}
return false;
}
The negation in the if clause is wrong. This affects two classes, GeoConvexPolygon and GeoConcavePolygon. I have ready a patch if you think it should be corrected.
Thanks,
I.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org