lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-8620) Add CONTAINS support for LatLonShape
Date Tue, 15 Jan 2019 18:54:00 GMT

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

Adrien Grand commented on LUCENE-8620:
--------------------------------------

Thanks Ignacio and sorry for taking so long to have a look. A few comments/questions:
 - Rectangle2D#withinTriangle and EdgeTree#withinTriangle are a bit hard to read, I think
a dedicated enum and better javadocs (eg. with your description in the previous comment) would
help.
 - Does Rectangle2D#withinTriangle actually return true if the box is within the triangle
but touches an edge of the triangle?
 - Several tests do assertTrue(a == b) but assertEquals would make test failures easier to
dig.
 - In Tessellator naming is a bit confusing at times. Eg. {{boolean cFromPolygon = (b.next
== a) ? b.nextFromPolygon : false;}} is confusing since it's called "cFromPolygon" while it
actually tests whether the ba edge belongs to the polygon.
 - Why did you add checks for the bounding box in Tessellator#pointInTriangle?
 - Can Tessellator.Triangle record a boolean[] or use the 3 lower bits of a byte instead of
three properties regarding whether edges are shared with the polygon? This would be more aligned
with the fact that it also records a Node[] rather than 3 Node properties?
 - Maybe remove the LatLonTriangle constructor that doesn't take booleans. It would usually
be a mistake to use it?
 - I am confused by the logic in encodeTriangle. How can we make assumptions like {{ab = aFromShape}}.
This seems to be making assumptions on how the tessellator works? It is generally not possible
to know whether an edge belongs to the original polygon only based on whether vertices belong
to the original polygon?

> Add CONTAINS support for LatLonShape
> ------------------------------------
>
>                 Key: LUCENE-8620
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8620
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/sandbox
>            Reporter: Ignacio Vera
>            Priority: Major
>             Fix For: 8.0, 7.7
>
>         Attachments: LUCENE-8620.patch
>
>
> Currently the only spatial operation that cannot be performed using {{LatLonShape}} is
CONTAINS. This issue will add such capability by tracking if an edge of a generated triangle
from the {{Tessellator}} is an edge of the polygon.



--
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


Mime
View raw message