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 2019/06/11 07:27:00 UTC
[jira] [Created] (LUCENE-8850) Creating a polygon with no area or
an invalid area should throw an error
Ignacio Vera created LUCENE-8850:
------------------------------------
Summary: Creating a polygon with no area or an invalid area should throw an error
Key: LUCENE-8850
URL: https://issues.apache.org/jira/browse/LUCENE-8850
Project: Lucene - Core
Issue Type: Improvement
Reporter: Ignacio Vera
Working with some polygon data which has some data quality issues I found two cases where we can throw an error as we know the polygon is invalid,
1) We are already computing the signed area on the Polygon constructor, therefore if the value is 0, then we know we are building a polygon with no area and therefore we can throw an error as it is an invalid polygon.
2) We can calculate the total area of the polygon and holes, if the area is lower or equal than 0, then the holes are equal or bigger than the polygon which it is an invalid polygon.
In addition I propose anew method to calculate the signed area which requires less arithmetic calculations and therefore it introduces less numerical errors.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org