Skip to content

Commit 4883029

Browse files
committed
fix changes
1 parent 6aa464d commit 4883029

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/src/main/java/org/elasticsearch/common/geo/EdgeTreeReader.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.io.IOException;
2525
import java.nio.ByteBuffer;
2626

27-
import static org.apache.lucene.geo.GeoUtils.lineCrossesLine;
27+
import static org.apache.lucene.geo.GeoUtils.lineCrossesLineWithBoundary;
2828

2929
public class EdgeTreeReader {
3030
final BytesRef bytesRef;
@@ -110,7 +110,7 @@ private boolean containsBottomLeft(ByteBufferStreamInput input, Edge root, int m
110110
if (root.maxY >= minY) {
111111
// is bbox-query contained within linearRing
112112
// 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)) {
114114
res = true;
115115
}
116116

@@ -134,10 +134,10 @@ private boolean crosses(ByteBufferStreamInput input, Edge root, int minX, int mi
134134
if (root.maxY >= minY) {
135135

136136
// 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)) {
141141
return true;
142142
}
143143

0 commit comments

Comments
 (0)