24
24
import java .io .IOException ;
25
25
import java .nio .ByteBuffer ;
26
26
27
- import static org .apache .lucene .geo .GeoUtils .lineCrossesLine ;
27
+ import static org .apache .lucene .geo .GeoUtils .lineCrossesLineWithBoundary ;
28
28
29
29
public class EdgeTreeReader {
30
30
final BytesRef bytesRef ;
@@ -110,7 +110,7 @@ private boolean containsBottomLeft(ByteBufferStreamInput input, Edge root, int m
110
110
if (root .maxY >= minY ) {
111
111
// is bbox-query contained within linearRing
112
112
// cast infinite ray to the right from bottom-left of bbox-query to see if it intersects edge
113
- if (lineCrossesLine (root .x1 , root .y1 , root .x2 , root .y2 ,minX , minY , Integer .MAX_VALUE , minY )) {
113
+ if (lineCrossesLineWithBoundary (root .x1 , root .y1 , root .x2 , root .y2 ,minX , minY , Integer .MAX_VALUE , minY )) {
114
114
res = true ;
115
115
}
116
116
@@ -134,10 +134,10 @@ private boolean crosses(ByteBufferStreamInput input, Edge root, int minX, int mi
134
134
if (root .maxY >= minY ) {
135
135
136
136
// does rectangle's edges intersect or reside inside polygon's edge
137
- if (lineCrossesLine (root .x1 , root .y1 , root .x2 , root .y2 , minX , minY , maxX , minY ) ||
138
- lineCrossesLine (root .x1 , root .y1 , root .x2 , root .y2 , maxX , minY , maxX , maxY ) ||
139
- lineCrossesLine (root .x1 , root .y1 , root .x2 , root .y2 , maxX , maxY , minX , maxY ) ||
140
- lineCrossesLine (root .x1 , root .y1 , root .x2 , root .y2 , minX , maxY , minX , minY )) {
137
+ if (lineCrossesLineWithBoundary (root .x1 , root .y1 , root .x2 , root .y2 , minX , minY , maxX , minY ) ||
138
+ lineCrossesLineWithBoundary (root .x1 , root .y1 , root .x2 , root .y2 , maxX , minY , maxX , maxY ) ||
139
+ lineCrossesLineWithBoundary (root .x1 , root .y1 , root .x2 , root .y2 , maxX , maxY , minX , maxY ) ||
140
+ lineCrossesLineWithBoundary (root .x1 , root .y1 , root .x2 , root .y2 , minX , maxY , minX , minY )) {
141
141
return true ;
142
142
}
143
143
0 commit comments