lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7941) GeoDegeneratePoints return intersects when located in edge shape
Date Fri, 25 Aug 2017 15:38:00 GMT

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

Karl Wright commented on LUCENE-7941:
-------------------------------------

[~ivera], a point *is* a shape; it just happens to be very very tiny.

I will clarify the GeoArea comments to make sure they are unambiguous.  Here is what it says
for getRelationship():

{code}
   * It is permissible to return OVERLAPS instead of WITHIN if the shape
   * intersects with the area at even a single point.  So, a circle inscribed in
   * a rectangle could return either OVERLAPS or WITHIN, depending on
   * implementation.  It is not permissible to return CONTAINS or DISJOINT
   * in this circumstance, however.
{code}

In other words, if it is difficult to determine whether the shape is fully WITHIN, you may
return OVERLAPS instead, as long as there is in fact some overlap.  For a GeoPoint, this is
not ambiguous or difficult at all; the point is either WITHIN the shape, or it's not.  We
have a method for assessing that: isWithin().  So it should be trivial to do the right thing
here.

The contract for intersects() is as follows:

{code}
   * Assess whether a plane, within the provided bounds, intersects
   * with the shape.  Note well that this method is allowed to return "true"
   * if there are internal edges of a composite shape which intersect the plane.
   * Doing this can cause getRelationship() for most GeoBBox shapes to return
   * OVERLAPS rather than the more correct CONTAINS, but that cannot be
   * helped for some complex shapes that are built out of overlapping parts.
{code}

Here the contract is not clear as to what should happen if the plane within its bounds are
entirely contained within the shape.  But that's not needed to understand the proper behavior
of a GeoDegeneratePoint -- the point should be considered to intersect only if it lies on
the plane within the bounds.  I will try to clarify the comment for other situations.



> GeoDegeneratePoints return intersects when located in edge shape 
> -----------------------------------------------------------------
>
>                 Key: LUCENE-7941
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7941
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>            Priority: Minor
>         Attachments: LUCENE-7941-test.patch
>
>
>  If the degenerate Geopoint lays on the boundary of a shape, the relationships between
the objects are not symetrical:
> The bounding box "thinks" it contains the degenerated point.
> The degenerated point "thinks" it intersects the shape.



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


Mime
View raw message