lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignacio Vera (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LUCENE-7941) GeoDegeneratePoints return intersects when located in edge shape
Date Sat, 26 Aug 2017 11:05:00 GMT

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

Ignacio Vera edited comment on LUCENE-7941 at 8/26/17 11:04 AM:
----------------------------------------------------------------

I think using the findCrossing is an overkill for performance. 

In the implementation you just committed the check: geoDegeneratedPoint.getRelationship(shape)
always return OVERLAPS when the point is inside the shape or in the edge.

In the previous implementation: geoDegeneratedPoint.getRelationship(shape)  always return
CONTAINS when the point is inside the shape or in the edge.

Note that the opposite: shape.getRelationship(geoDegeneratedPoint)  returns WITHIN when it
is inside the shape except when it is in the edge that return OVERLAPS.

I think the second one is more accurate but we need to add in the contract of intersection(GeoShape
geoShape):

"It is permissible to return false if the shape does not cross any edge but it is difficult
to compute intersection with edges"

If you are more happy with your implementation, it is fine with me. We have those two options
and I am fine with both as they agree with the contract.





was (Author: ivera):
I think using the findCrossing is an overkill for performance. 

In the implementation you just committed the check: geoDegeneratedPoint.getRelationship(shape)
always return OVERLAPS when the point is inside the shape or in the edge.

In the previous implementation: geoDegeneratedPoint.getRelationship(shape)  always return
CONTAINS when the point is inside the shape or in the edge.

I think the second one is more accurate but we need to add in the contract of intersection(GeoShape
geoShape):

"It is permissible to return false if the shape does not cross any edge but it is difficult
to compute intersection with edges"

If you are more happy with your implementation, it is fine with me. We have those two options
and I am fine with both as they agree with the contract.




> 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
>             Fix For: 6.7, master (8.0), 7.1
>
>         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