[ 
https://issues.apache.org/jira/browse/LUCENE-8364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16519478#comment-16519478
 ] 

Robert Muir commented on LUCENE-8364:
-------------------------------------

Also there is another problem with having Polygon create Polygon2D 
datastructures, there is not a one-to-one relationship between the two.

Anything using this should create Polygon2D explicitly itself because it has 
many-to-one relationship:

{code}
  /** Builds a Polygon2D from multipolygon */
public static Polygon2D create(Polygon... polygons) {
{code}

This is really important: since for multipolygons it builds a 2-stage tree. We 
don't want to encourage users creating these things for individual polygons and 
using booleanquery or something like that, it will result in stuff that runs in 
linear time.

> Refactor and clean up core geo api
> ----------------------------------
>
>                 Key: LUCENE-8364
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8364
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Nicholas Knize
>            Priority: Major
>         Attachments: LUCENE-8364.patch
>
>
> The core geo API is quite disorganized and confusing. For example there is 
> {{Polygon}} for creating an instance of polygon vertices and holes and 
> {{Polygon2D}} for computing relations between points and polygons. There is 
> also a {{PolygonPredicate}} and {{DistancePredicate}} in {{GeoUtils}} for 
> computing point in polygon and point distance relations, respectively, and a 
> {{GeoRelationUtils}} utility class which is no longer used for anything. This 
> disorganization is due to the organic improvements of simple {{LatLonPoint}} 
> indexing and search features and a little TLC is needed to clean up api to 
> make it more approachable and easy to understand. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to