You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2022/11/23 03:06:21 UTC
[lucene] 03/04: Resolve merge conflicts
This is an automated email from the ASF dual-hosted git repository.
kwright pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit 49c8a759176100490565f0b0d93d99fbfce332dd
Merge: 0593eca73dc 1ded41ea20d
Author: Karl David Wright <kw...@apache.org>
AuthorDate: Tue Nov 22 21:29:06 2022 -0500
Resolve merge conflicts
.../lucene/spatial3d/geom/DistanceStyle.java | 11 +-
.../lucene/spatial3d/geom/GeoDegeneratePath.java | 127 ++++----
.../lucene/spatial3d/geom/GeoStandardPath.java | 319 +++++++++++++++------
.../apache/lucene/spatial3d/geom/TestGeoPath.java | 6 +-
.../geom/TestSimpleGeoPolygonRelationships.java | 1 +
5 files changed, 309 insertions(+), 155 deletions(-)
diff --cc lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoStandardPath.java
index c761b7453b2,8f501b1406c..49080a6ce46
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoStandardPath.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoStandardPath.java
@@@ -1061,19 -1110,41 +1111,55 @@@ class GeoStandardPath extends GeoBasePa
return geoShape.intersects(circlePlane, this.notablePoints, this.cutoffPlanes);
}
+ @Override
+ public double nearestPathDistance(
+ final DistanceStyle distanceStyle, final double x, final double y, final double z) {
+ for (final Membership cutoff : cutoffPlanes) {
+ if (!cutoff.isWithin(x, y, z)) {
+ return Double.POSITIVE_INFINITY;
+ }
+ }
+ return super.nearestPathDistance(distanceStyle, x, y, z);
+ }
+
+ @Override
+ public double pathCenterDistance(
+ final DistanceStyle distanceStyle, final double x, final double y, final double z) {
+ for (final Membership cutoff : cutoffPlanes) {
+ if (!cutoff.isWithin(x, y, z)) {
+ return Double.POSITIVE_INFINITY;
+ }
+ }
+ return super.pathCenterDistance(distanceStyle, x, y, z);
+ }
+
+ @Override
+ public void getBounds(final Bounds bounds) {
+ super.getBounds(bounds);
+ bounds.addPlane(planetModel, circlePlane, cutoffPlane);
+ bounds.addPlane(planetModel, cutoffPlane, circlePlane);
+ bounds.addIntersection(planetModel, circlePlane, cutoffPlane);
+ bounds.addIntersection(planetModel, cutoffPlane, circlePlane);
+ }
+
+ @Override
+ public String toString() {
+ return "CutoffSingleCircleSegmentEndpoint: " + super.toString();
+ }
++
+ @Override
+ public void getBounds(final Bounds bounds) {
+ super.getBounds(bounds);
+ bounds.addPlane(planetModel, circlePlane, cutoffPlane);
+ bounds.addPlane(planetModel, cutoffPlane, circlePlane);
+ bounds.addIntersection(planetModel, circlePlane, cutoffPlane);
+ bounds.addIntersection(planetModel, cutoffPlane, circlePlane);
+ }
+
+ @Override
+ public String toString() {
+ return "CutoffSingleCircleSegmentEndpoint: " + super.toString();
+ }
}
/**