diff --git a/libs/geo/build.gradle b/libs/geo/build.gradle index da025e95c43..b98e72c549b 100644 --- a/libs/geo/build.gradle +++ b/libs/geo/build.gradle @@ -17,12 +17,12 @@ * under the License. */ -apply plugin: 'elasticsearch.build' -apply plugin: 'elasticsearch.publish' +apply plugin: 'opensearch.build' +apply plugin: 'opensearch.publish' dependencies { testImplementation(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-geo' + exclude group: 'org.opensearch', module: 'opensearch-geo' } } diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Circle.java b/libs/geo/src/main/java/org/opensearch/geometry/Circle.java similarity index 94% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Circle.java rename to libs/geo/src/main/java/org/opensearch/geometry/Circle.java index ba61ba8745b..f7db3ccaac0 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Circle.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Circle.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; /** - * Circle geometry (not part of WKT standard, but used in elasticsearch) defined by lat/lon coordinates of the center in degrees + * Circle geometry (not part of WKT standard, but used in opensearch) defined by lat/lon coordinates of the center in degrees * and optional altitude in meters. */ public class Circle implements Geometry { diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Geometry.java b/libs/geo/src/main/java/org/opensearch/geometry/Geometry.java similarity index 91% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Geometry.java rename to libs/geo/src/main/java/org/opensearch/geometry/Geometry.java index f8c65a4e455..16bd2176268 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Geometry.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Geometry.java @@ -17,10 +17,10 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; /** - * Base class for all Geometry objects supported by elasticsearch + * Base class for all Geometry objects supported by opensearch */ public interface Geometry { diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/GeometryCollection.java b/libs/geo/src/main/java/org/opensearch/geometry/GeometryCollection.java similarity index 96% rename from libs/geo/src/main/java/org/elasticsearch/geometry/GeometryCollection.java rename to libs/geo/src/main/java/org/opensearch/geometry/GeometryCollection.java index efed0c37772..a60e3c535e9 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/GeometryCollection.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/GeometryCollection.java @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; import java.util.Collections; import java.util.Iterator; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/GeometryVisitor.java b/libs/geo/src/main/java/org/opensearch/geometry/GeometryVisitor.java similarity index 96% rename from libs/geo/src/main/java/org/elasticsearch/geometry/GeometryVisitor.java rename to libs/geo/src/main/java/org/opensearch/geometry/GeometryVisitor.java index 523d0f53a9e..093171b94ef 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/GeometryVisitor.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/GeometryVisitor.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; /** * Support class for creating Geometry Visitors. diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Line.java b/libs/geo/src/main/java/org/opensearch/geometry/Line.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Line.java rename to libs/geo/src/main/java/org/opensearch/geometry/Line.java index a7f3c818adc..94189efbf51 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Line.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Line.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; import java.util.Arrays; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/LinearRing.java b/libs/geo/src/main/java/org/opensearch/geometry/LinearRing.java similarity index 98% rename from libs/geo/src/main/java/org/elasticsearch/geometry/LinearRing.java rename to libs/geo/src/main/java/org/opensearch/geometry/LinearRing.java index babe02bdf55..40008fd5c10 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/LinearRing.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/LinearRing.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.Arrays; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiLine.java b/libs/geo/src/main/java/org/opensearch/geometry/MultiLine.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/MultiLine.java rename to libs/geo/src/main/java/org/opensearch/geometry/MultiLine.java index f7e88e36cc9..34f23aeb088 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiLine.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/MultiLine.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.List; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiPoint.java b/libs/geo/src/main/java/org/opensearch/geometry/MultiPoint.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/MultiPoint.java rename to libs/geo/src/main/java/org/opensearch/geometry/MultiPoint.java index 2737586d70c..c015d8b6bf8 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiPoint.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/MultiPoint.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.List; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiPolygon.java b/libs/geo/src/main/java/org/opensearch/geometry/MultiPolygon.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/MultiPolygon.java rename to libs/geo/src/main/java/org/opensearch/geometry/MultiPolygon.java index 5226cb4a8f8..a05695faa68 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/MultiPolygon.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/MultiPolygon.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.List; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Point.java b/libs/geo/src/main/java/org/opensearch/geometry/Point.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Point.java rename to libs/geo/src/main/java/org/opensearch/geometry/Point.java index a4513e8ebb9..3ad5178d329 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Point.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Point.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; /** * Represents a Point on the earth's surface in decimal degrees and optional altitude in meters. diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Polygon.java b/libs/geo/src/main/java/org/opensearch/geometry/Polygon.java similarity index 99% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Polygon.java rename to libs/geo/src/main/java/org/opensearch/geometry/Polygon.java index 62cf19bf0b8..4918c9c8ece 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Polygon.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Polygon.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.Collections; import java.util.List; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/Rectangle.java b/libs/geo/src/main/java/org/opensearch/geometry/Rectangle.java similarity index 98% rename from libs/geo/src/main/java/org/elasticsearch/geometry/Rectangle.java rename to libs/geo/src/main/java/org/opensearch/geometry/Rectangle.java index 4433cb06c33..d912cea2b06 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/Rectangle.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/Rectangle.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.WellKnownText; /** * Represents a lat/lon rectangle in decimal degrees and optional altitude in meters. diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/ShapeType.java b/libs/geo/src/main/java/org/opensearch/geometry/ShapeType.java similarity index 94% rename from libs/geo/src/main/java/org/elasticsearch/geometry/ShapeType.java rename to libs/geo/src/main/java/org/opensearch/geometry/ShapeType.java index 851c3a71180..8fc739b3382 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/ShapeType.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/ShapeType.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import java.util.Locale; /** - * Shape types supported by elasticsearch + * Shape types supported by opensearch */ public enum ShapeType { POINT, diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/package-info.java b/libs/geo/src/main/java/org/opensearch/geometry/package-info.java similarity index 95% rename from libs/geo/src/main/java/org/elasticsearch/geometry/package-info.java rename to libs/geo/src/main/java/org/opensearch/geometry/package-info.java index d4145bd5bcf..0bb9857a485 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/package-info.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/package-info.java @@ -21,4 +21,4 @@ /** * Common Geometry classes */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/BitUtil.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/BitUtil.java similarity index 98% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/BitUtil.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/BitUtil.java index 4cba3859f5e..05dabefaa5d 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/BitUtil.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/BitUtil.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; /** * Utilities for common Bit twiddling methods. Borrowed heavily from Lucene (org.apache.lucene.util.BitUtil). diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeographyValidator.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/GeographyValidator.java similarity index 90% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeographyValidator.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/GeographyValidator.java index 82301cc5038..e09a41cbd21 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeographyValidator.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/GeographyValidator.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; /** * Validator that checks that lats are between -90 and +90 and lons are between -180 and +180 and altitude is present only if diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/Geohash.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/Geohash.java similarity index 99% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/Geohash.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/Geohash.java index 7ff52f5dc19..8f7cb0e034a 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/Geohash.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/Geohash.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Rectangle; import java.util.ArrayList; import java.util.Collection; diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeometryValidator.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/GeometryValidator.java similarity index 92% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeometryValidator.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/GeometryValidator.java index 3a9110aaf86..b15f4a0e4ca 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/GeometryValidator.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/GeometryValidator.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; /** * Generic geometry validator that can be used by the parser to verify the validity of the parsed geometry diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/StandardValidator.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/StandardValidator.java similarity index 87% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/StandardValidator.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/StandardValidator.java index b5bc5cef7e7..bdf14ea99b3 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/StandardValidator.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/StandardValidator.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; /** * Validator that only checks that altitude only shows up if ignoreZValue is set to true. diff --git a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/WellKnownText.java b/libs/geo/src/main/java/org/opensearch/geometry/utils/WellKnownText.java similarity index 97% rename from libs/geo/src/main/java/org/elasticsearch/geometry/utils/WellKnownText.java rename to libs/geo/src/main/java/org/opensearch/geometry/utils/WellKnownText.java index 4efdc0aca8f..2a8379d84e1 100644 --- a/libs/geo/src/main/java/org/elasticsearch/geometry/utils/WellKnownText.java +++ b/libs/geo/src/main/java/org/opensearch/geometry/utils/WellKnownText.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import java.io.IOException; import java.io.StreamTokenizer; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/BaseGeometryTestCase.java b/libs/geo/src/test/java/org/opensearch/geometry/BaseGeometryTestCase.java similarity index 95% rename from libs/geo/src/test/java/org/elasticsearch/geometry/BaseGeometryTestCase.java rename to libs/geo/src/test/java/org/opensearch/geometry/BaseGeometryTestCase.java index 2a964656bff..8e5c599bb46 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/BaseGeometryTestCase.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/BaseGeometryTestCase.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.OpenSearchException; import org.elasticsearch.Version; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.WellKnownText; import org.elasticsearch.test.AbstractWireTestCase; import java.io.IOException; @@ -63,7 +63,7 @@ abstract class BaseGeometryTestCase extends AbstractWireTest private Object verify(Geometry geometry, String expectedClass) { assertFalse("Visitor should be called only once", called.getAndSet(true)); assertSame(geom, geometry); - assertEquals(geometry.getClass().getName(), "org.elasticsearch.geometry." + expectedClass); + assertEquals(geometry.getClass().getName(), "org.opensearch.geometry." + expectedClass); return "result"; } diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/CircleTests.java b/libs/geo/src/test/java/org/opensearch/geometry/CircleTests.java similarity index 91% rename from libs/geo/src/test/java/org/elasticsearch/geometry/CircleTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/CircleTests.java index 9f42118821f..75b3019e376 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/CircleTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/CircleTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/GeometryCollectionTests.java b/libs/geo/src/test/java/org/opensearch/geometry/GeometryCollectionTests.java similarity index 93% rename from libs/geo/src/test/java/org/elasticsearch/geometry/GeometryCollectionTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/GeometryCollectionTests.java index a0898242546..bf32fe8c91c 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/GeometryCollectionTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/GeometryCollectionTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/GeometryValidatorTests.java b/libs/geo/src/test/java/org/opensearch/geometry/GeometryValidatorTests.java similarity index 95% rename from libs/geo/src/test/java/org/elasticsearch/geometry/GeometryValidatorTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/GeometryValidatorTests.java index 3c732a25ec1..1850abfa53b 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/GeometryValidatorTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/GeometryValidatorTests.java @@ -17,11 +17,11 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.WellKnownText; import org.elasticsearch.test.ESTestCase; public class GeometryValidatorTests extends ESTestCase { diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/LineTests.java b/libs/geo/src/test/java/org/opensearch/geometry/LineTests.java similarity index 93% rename from libs/geo/src/test/java/org/elasticsearch/geometry/LineTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/LineTests.java index 0ca38c185ef..fb8ecc1f314 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/LineTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/LineTests.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/LinearRingTests.java b/libs/geo/src/test/java/org/opensearch/geometry/LinearRingTests.java similarity index 92% rename from libs/geo/src/test/java/org/elasticsearch/geometry/LinearRingTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/LinearRingTests.java index 5ad2a3beb8e..cc42f4b1144 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/LinearRingTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/LinearRingTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import org.elasticsearch.test.ESTestCase; public class LinearRingTests extends ESTestCase { diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiLineTests.java b/libs/geo/src/test/java/org/opensearch/geometry/MultiLineTests.java similarity index 92% rename from libs/geo/src/test/java/org/elasticsearch/geometry/MultiLineTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/MultiLineTests.java index 260eb5facf4..a9504689dc0 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiLineTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/MultiLineTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiPointTests.java b/libs/geo/src/test/java/org/opensearch/geometry/MultiPointTests.java similarity index 93% rename from libs/geo/src/test/java/org/elasticsearch/geometry/MultiPointTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/MultiPointTests.java index c512603d0b7..71819da9f2f 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiPointTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/MultiPointTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiPolygonTests.java b/libs/geo/src/test/java/org/opensearch/geometry/MultiPolygonTests.java similarity index 93% rename from libs/geo/src/test/java/org/elasticsearch/geometry/MultiPolygonTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/MultiPolygonTests.java index ee1d9a6a587..f3b6119c429 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/MultiPolygonTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/MultiPolygonTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/PointTests.java b/libs/geo/src/test/java/org/opensearch/geometry/PointTests.java similarity index 91% rename from libs/geo/src/test/java/org/elasticsearch/geometry/PointTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/PointTests.java index 79c9371e58c..de341e0384c 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/PointTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/PointTests.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/PolygonTests.java b/libs/geo/src/test/java/org/opensearch/geometry/PolygonTests.java similarity index 96% rename from libs/geo/src/test/java/org/elasticsearch/geometry/PolygonTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/PolygonTests.java index c90243d253d..1ab8af7b611 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/PolygonTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/PolygonTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/RectangleTests.java b/libs/geo/src/test/java/org/opensearch/geometry/RectangleTests.java similarity index 91% rename from libs/geo/src/test/java/org/elasticsearch/geometry/RectangleTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/RectangleTests.java index 32ce6abe8de..ed673da2d93 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/RectangleTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/RectangleTests.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.geometry; +package org.opensearch.geometry; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/libs/geo/src/test/java/org/elasticsearch/geometry/utils/GeoHashTests.java b/libs/geo/src/test/java/org/opensearch/geometry/utils/GeoHashTests.java similarity index 97% rename from libs/geo/src/test/java/org/elasticsearch/geometry/utils/GeoHashTests.java rename to libs/geo/src/test/java/org/opensearch/geometry/utils/GeoHashTests.java index e0cb2528480..a8694184eff 100644 --- a/libs/geo/src/test/java/org/elasticsearch/geometry/utils/GeoHashTests.java +++ b/libs/geo/src/test/java/org/opensearch/geometry/utils/GeoHashTests.java @@ -16,11 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.geometry.utils; +package org.opensearch.geometry.utils; import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; +import org.opensearch.geometry.utils.Geohash; /** * Tests for {@link Geohash} diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoBoundingBox.java b/server/src/main/java/org/elasticsearch/common/geo/GeoBoundingBox.java index 02713e86281..a965e322c90 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoBoundingBox.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoBoundingBox.java @@ -26,11 +26,11 @@ import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.ShapeType; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.ShapeType; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoJson.java b/server/src/main/java/org/elasticsearch/common/geo/GeoJson.java index 0fa70cf76f3..f3cbc75e071 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoJson.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoJson.java @@ -31,20 +31,20 @@ import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentSubParser; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.ShapeType; -import org.elasticsearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.ShapeType; +import org.opensearch.geometry.utils.GeometryValidator; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoJsonGeometryFormat.java b/server/src/main/java/org/elasticsearch/common/geo/GeoJsonGeometryFormat.java index 0bc220462c0..d939e7dccdb 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoJsonGeometryFormat.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoJsonGeometryFormat.java @@ -22,7 +22,7 @@ package org.elasticsearch.common.geo; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoLineDecomposer.java b/server/src/main/java/org/elasticsearch/common/geo/GeoLineDecomposer.java index 35c2d4a4b55..5352e9602dd 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoLineDecomposer.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoLineDecomposer.java @@ -19,8 +19,8 @@ package org.elasticsearch.common.geo; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.MultiLine; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.MultiLine; import java.util.Arrays; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java b/server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java index daa3c0414ea..f73aee9d801 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoPoint.java @@ -29,13 +29,13 @@ import org.elasticsearch.OpenSearchParseException; import org.elasticsearch.common.geo.GeoUtils.EffectivePoint; import org.elasticsearch.common.xcontent.ToXContentFragment; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.ShapeType; -import org.elasticsearch.geometry.utils.GeographyValidator; -import org.elasticsearch.geometry.utils.Geohash; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.ShapeType; +import org.opensearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoPolygonDecomposer.java b/server/src/main/java/org/elasticsearch/common/geo/GeoPolygonDecomposer.java index 44fe5ab1d09..a97f9989c21 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoPolygonDecomposer.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoPolygonDecomposer.java @@ -20,10 +20,10 @@ package org.elasticsearch.common.geo; import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; import org.locationtech.spatial4j.exception.InvalidShapeException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeoShapeUtils.java b/server/src/main/java/org/elasticsearch/common/geo/GeoShapeUtils.java index 7e23385f2ad..c5ab5a02f48 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeoShapeUtils.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeoShapeUtils.java @@ -18,11 +18,11 @@ */ package org.elasticsearch.common.geo; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; /** diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeometryIO.java b/server/src/main/java/org/elasticsearch/common/geo/GeometryIO.java index 9b666bfa876..7de5bd93b73 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeometryIO.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeometryIO.java @@ -22,18 +22,18 @@ package org.elasticsearch.common.geo; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/common/geo/GeometryParser.java b/server/src/main/java/org/elasticsearch/common/geo/GeometryParser.java index 81e073a479e..af34b5fdaca 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/GeometryParser.java +++ b/server/src/main/java/org/elasticsearch/common/geo/GeometryParser.java @@ -24,12 +24,12 @@ import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.support.MapXContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.utils.GeometryValidator; -import org.elasticsearch.geometry.utils.StandardValidator; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.utils.GeometryValidator; +import org.opensearch.geometry.utils.StandardValidator; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/server/src/main/java/org/elasticsearch/common/geo/WKTGeometryFormat.java b/server/src/main/java/org/elasticsearch/common/geo/WKTGeometryFormat.java index dc0671c51e1..02018cafdcc 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/WKTGeometryFormat.java +++ b/server/src/main/java/org/elasticsearch/common/geo/WKTGeometryFormat.java @@ -22,8 +22,8 @@ package org.elasticsearch.common.geo; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.utils.WellKnownText; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.utils.WellKnownText; import java.io.IOException; import java.text.ParseException; diff --git a/server/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java b/server/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java index b3ac8e5dc06..10d92dedaf0 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java +++ b/server/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java @@ -34,7 +34,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.util.Objects; -public class CircleBuilder extends ShapeBuilder { +public class CircleBuilder extends ShapeBuilder { public static final ParseField FIELD_RADIUS = new ParseField("radius"); public static final GeoShapeType TYPE = GeoShapeType.CIRCLE; @@ -164,8 +164,8 @@ public class CircleBuilder extends ShapeBuilder { +public class EnvelopeBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.ENVELOPE; @@ -113,8 +113,8 @@ public class EnvelopeBuilder extends ShapeBuilder { +public class LineStringBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.LINESTRING; /** @@ -121,7 +121,7 @@ public class LineStringBuilder extends ShapeBuilderi.x).toArray(), coordinates.stream().mapToDouble(i->i.y).toArray() ); } diff --git a/server/src/main/java/org/elasticsearch/common/geo/builders/MultiLineStringBuilder.java b/server/src/main/java/org/elasticsearch/common/geo/builders/MultiLineStringBuilder.java index 07fa5d0b46c..5cb8375bc58 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/builders/MultiLineStringBuilder.java +++ b/server/src/main/java/org/elasticsearch/common/geo/builders/MultiLineStringBuilder.java @@ -25,8 +25,8 @@ import org.elasticsearch.common.geo.parsers.ShapeParser; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.MultiLine; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.MultiLine; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.LineString; @@ -38,7 +38,7 @@ import java.util.Iterator; import java.util.List; import java.util.Objects; -public class MultiLineStringBuilder extends ShapeBuilder { +public class MultiLineStringBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.MULTILINESTRING; @@ -151,7 +151,7 @@ public class MultiLineStringBuilder extends ShapeBuilder, Mul if (coordinates.isEmpty()) { return MultiPoint.EMPTY; } - return new MultiPoint(coordinates.stream().map(coord -> new org.elasticsearch.geometry.Point(coord.x, coord.y)) + return new MultiPoint(coordinates.stream().map(coord -> new org.opensearch.geometry.Point(coord.x, coord.y)) .collect(Collectors.toList())); } diff --git a/server/src/main/java/org/elasticsearch/common/geo/builders/MultiPolygonBuilder.java b/server/src/main/java/org/elasticsearch/common/geo/builders/MultiPolygonBuilder.java index ffd7818964e..736093278f4 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/builders/MultiPolygonBuilder.java +++ b/server/src/main/java/org/elasticsearch/common/geo/builders/MultiPolygonBuilder.java @@ -26,8 +26,8 @@ import org.elasticsearch.common.geo.parsers.ShapeParser; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Polygon; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Polygon; import org.locationtech.jts.geom.Coordinate; import org.locationtech.spatial4j.shape.Shape; diff --git a/server/src/main/java/org/elasticsearch/common/geo/builders/PointBuilder.java b/server/src/main/java/org/elasticsearch/common/geo/builders/PointBuilder.java index fff7a501210..75ad8b222ff 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/builders/PointBuilder.java +++ b/server/src/main/java/org/elasticsearch/common/geo/builders/PointBuilder.java @@ -28,7 +28,7 @@ import org.locationtech.spatial4j.shape.Point; import java.io.IOException; -public class PointBuilder extends ShapeBuilder { +public class PointBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.POINT; /** @@ -88,8 +88,8 @@ public class PointBuilder extends ShapeBuilder { +public class PolygonBuilder extends ShapeBuilder { public static final GeoShapeType TYPE = GeoShapeType.POLYGON; @@ -231,7 +231,7 @@ public class PolygonBuilder extends ShapeBuilder holes = new ArrayList<>(this.holes.size()); + public org.opensearch.geometry.Polygon toPolygonGeometry() { + final List holes = new ArrayList<>(this.holes.size()); for (int i = 0; i < this.holes.size(); ++i) { holes.add(linearRing(this.holes.get(i).coordinates)); } - return new org.elasticsearch.geometry.Polygon(linearRing(this.shell.coordinates), holes); + return new org.opensearch.geometry.Polygon(linearRing(this.shell.coordinates), holes); } - protected static org.elasticsearch.geometry.LinearRing linearRing(List coordinates) { - return new org.elasticsearch.geometry.LinearRing(coordinates.stream().mapToDouble(i -> i.x).toArray(), + protected static org.opensearch.geometry.LinearRing linearRing(List coordinates) { + return new org.opensearch.geometry.LinearRing(coordinates.stream().mapToDouble(i -> i.x).toArray(), coordinates.stream().mapToDouble(i -> i.y).toArray() ); } diff --git a/server/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java b/server/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java index 890b9d64282..bc938cc539a 100644 --- a/server/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java +++ b/server/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java @@ -52,7 +52,7 @@ import java.util.Objects; /** * Basic class for building GeoJSON shapes like Polygons, Linestrings, etc */ -public abstract class ShapeBuilder> implements NamedWriteable, ToXContentObject { protected static final Logger LOGGER = LogManager.getLogger(ShapeBuilder.class); diff --git a/server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java b/server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java index 1dfb10098b8..988af6491a9 100644 --- a/server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java @@ -26,7 +26,7 @@ import org.apache.lucene.util.BytesRefBuilder; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.GeoUtils; import org.elasticsearch.common.time.DateUtils; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.script.JodaCompatibleZonedDateTime; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/AbstractPointGeometryFieldMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/AbstractPointGeometryFieldMapper.java index 7a0b5c12c79..10dc6659ce9 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/AbstractPointGeometryFieldMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/AbstractPointGeometryFieldMapper.java @@ -29,8 +29,8 @@ import org.elasticsearch.common.geo.GeometryParser; import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.Point; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.Point; import java.io.IOException; import java.text.ParseException; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java index fd32993228b..910f944c0dd 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java @@ -31,8 +31,8 @@ import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.GeoUtils; import org.elasticsearch.common.geo.ShapeRelation; import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.Point; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.Point; import org.elasticsearch.index.fielddata.IndexFieldData; import org.elasticsearch.index.fielddata.plain.AbstractLatLonPointIndexFieldData; import org.elasticsearch.index.mapper.GeoPointFieldMapper.ParsedGeoPoint; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeFieldMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeFieldMapper.java index a28b8fcf866..68203f44f51 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeFieldMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeFieldMapper.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.Explicit; import org.elasticsearch.common.geo.GeometryParser; import org.elasticsearch.common.geo.ShapeRelation; import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.index.query.VectorGeoShapeQueryProcessor; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeIndexer.java b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeIndexer.java index 81e3392a718..80081184373 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeIndexer.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeIndexer.java @@ -27,18 +27,18 @@ import org.elasticsearch.common.geo.GeoPolygonDecomposer; import org.elasticsearch.common.geo.GeoShapeUtils; import org.elasticsearch.common.geo.GeoShapeType; import org.elasticsearch.common.geo.GeoUtils; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import java.util.ArrayList; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeParser.java b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeParser.java index 38fe6c39448..d21aa1367ea 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeParser.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeParser.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.common.xcontent.support.MapXContentParser; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeQueryable.java b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeQueryable.java index 2c7662316ae..35c164d39a8 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeQueryable.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/GeoShapeQueryable.java @@ -22,7 +22,7 @@ package org.elasticsearch.index.mapper; import org.apache.lucene.search.Query; import org.elasticsearch.common.geo.ShapeRelation; import org.elasticsearch.common.geo.SpatialStrategy; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.query.QueryShardContext; /** diff --git a/server/src/main/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapper.java index 9eb95993242..75b3a443533 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapper.java @@ -47,7 +47,7 @@ import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.query.LegacyGeoShapeQueryProcessor; import org.elasticsearch.index.query.QueryShardContext; import org.locationtech.spatial4j.shape.Shape; diff --git a/server/src/main/java/org/elasticsearch/index/query/AbstractGeometryQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/AbstractGeometryQueryBuilder.java index 76e831b801e..81b8ed08856 100644 --- a/server/src/main/java/org/elasticsearch/index/query/AbstractGeometryQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/AbstractGeometryQueryBuilder.java @@ -42,7 +42,7 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.mapper.MappedFieldType; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilder.java index 2f8c10d0370..14d0194d96d 100644 --- a/server/src/main/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilder.java @@ -35,8 +35,8 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.index.mapper.GeoPointFieldMapper.GeoPointFieldType; import org.elasticsearch.index.mapper.MappedFieldType; diff --git a/server/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java b/server/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java index f2020982ef7..139d93b72fd 100644 --- a/server/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.mapper.GeoShapeQueryable; import org.elasticsearch.index.mapper.MappedFieldType; diff --git a/server/src/main/java/org/elasticsearch/index/query/LegacyGeoShapeQueryProcessor.java b/server/src/main/java/org/elasticsearch/index/query/LegacyGeoShapeQueryProcessor.java index 1b523a6c751..16aa37cc07b 100644 --- a/server/src/main/java/org/elasticsearch/index/query/LegacyGeoShapeQueryProcessor.java +++ b/server/src/main/java/org/elasticsearch/index/query/LegacyGeoShapeQueryProcessor.java @@ -40,18 +40,18 @@ import org.elasticsearch.common.geo.builders.PointBuilder; import org.elasticsearch.common.geo.builders.PolygonBuilder; import org.elasticsearch.common.geo.builders.ShapeBuilder; import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.index.mapper.AbstractShapeGeometryFieldMapper; import org.elasticsearch.index.mapper.LegacyGeoShapeFieldMapper; import org.locationtech.jts.geom.Coordinate; diff --git a/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java b/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java index a7ec2d04a39..12ed10e7ef4 100644 --- a/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java +++ b/server/src/main/java/org/elasticsearch/index/query/QueryBuilders.java @@ -24,7 +24,7 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.ShapeRelation; import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.geometry.Geometry; +import org.opensearch.geometry.Geometry; import org.elasticsearch.index.query.DistanceFeatureQueryBuilder.Origin; import org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item; import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; @@ -84,7 +84,7 @@ public final class QueryBuilders { public static MultiMatchQueryBuilder multiMatchQuery(Object text, String... fieldNames) { return new MultiMatchQueryBuilder(text, fieldNames); // BOOLEAN is the default } - + /** * Creates a text query with type "BOOL_PREFIX" for the provided field name and text. * @@ -94,7 +94,7 @@ public final class QueryBuilders { public static MatchBoolPrefixQueryBuilder matchBoolPrefixQuery(String name, Object text) { return new MatchBoolPrefixQueryBuilder(name, text); } - + /** * Creates a text query with type "PHRASE" for the provided field name and text. * diff --git a/server/src/main/java/org/elasticsearch/index/query/VectorGeoPointShapeQueryProcessor.java b/server/src/main/java/org/elasticsearch/index/query/VectorGeoPointShapeQueryProcessor.java index 3bb4d09b959..e84eb2f5bc6 100644 --- a/server/src/main/java/org/elasticsearch/index/query/VectorGeoPointShapeQueryProcessor.java +++ b/server/src/main/java/org/elasticsearch/index/query/VectorGeoPointShapeQueryProcessor.java @@ -29,18 +29,18 @@ import org.elasticsearch.common.geo.GeoPolygonDecomposer; import org.elasticsearch.common.geo.GeoShapeType; import org.elasticsearch.common.geo.GeoShapeUtils; import org.elasticsearch.common.geo.ShapeRelation; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.ShapeType; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.ShapeType; import org.elasticsearch.index.mapper.GeoPointFieldMapper; import org.elasticsearch.index.mapper.MappedFieldType; @@ -113,7 +113,7 @@ public class VectorGeoPointShapeQueryProcessor { } @Override - public Query visit(org.elasticsearch.geometry.Line line) { + public Query visit(org.opensearch.geometry.Line line) { throw new QueryShardException(context, "Field [" + fieldName + "] does not support " + GeoShapeType.LINESTRING + " queries"); } @@ -154,7 +154,7 @@ public class VectorGeoPointShapeQueryProcessor { @Override public Query visit(MultiPolygon multiPolygon) { - ArrayList collector = new ArrayList<>(); + ArrayList collector = new ArrayList<>(); GeoPolygonDecomposer.decomposeMultiPolygon(multiPolygon, true, collector); return visit(collector); } @@ -168,7 +168,7 @@ public class VectorGeoPointShapeQueryProcessor { @Override public Query visit(Polygon polygon) { - ArrayList collector = new ArrayList<>(); + ArrayList collector = new ArrayList<>(); GeoPolygonDecomposer.decomposePolygon(polygon, true, collector); return visit(collector); } diff --git a/server/src/main/java/org/elasticsearch/index/query/VectorGeoShapeQueryProcessor.java b/server/src/main/java/org/elasticsearch/index/query/VectorGeoShapeQueryProcessor.java index eb519011faa..35aaa4cd5b6 100644 --- a/server/src/main/java/org/elasticsearch/index/query/VectorGeoShapeQueryProcessor.java +++ b/server/src/main/java/org/elasticsearch/index/query/VectorGeoShapeQueryProcessor.java @@ -28,18 +28,18 @@ import org.elasticsearch.common.geo.GeoLineDecomposer; import org.elasticsearch.common.geo.GeoPolygonDecomposer; import org.elasticsearch.common.geo.GeoShapeUtils; import org.elasticsearch.common.geo.ShapeRelation; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import java.util.ArrayList; import java.util.List; @@ -99,9 +99,9 @@ public class VectorGeoShapeQueryProcessor { } @Override - public Void visit(org.elasticsearch.geometry.Line line) { + public Void visit(org.opensearch.geometry.Line line) { if (line.isEmpty() == false) { - List collector = new ArrayList<>(); + List collector = new ArrayList<>(); GeoLineDecomposer.decomposeLine(line, collector); collectLines(collector); } @@ -115,7 +115,7 @@ public class VectorGeoShapeQueryProcessor { @Override public Void visit(MultiLine multiLine) { - List collector = new ArrayList<>(); + List collector = new ArrayList<>(); GeoLineDecomposer.decomposeMultiLine(multiLine, collector); collectLines(collector); return null; @@ -132,7 +132,7 @@ public class VectorGeoShapeQueryProcessor { @Override public Void visit(MultiPolygon multiPolygon) { if (multiPolygon.isEmpty() == false) { - List collector = new ArrayList<>(); + List collector = new ArrayList<>(); GeoPolygonDecomposer.decomposeMultiPolygon(multiPolygon, true, collector); collectPolygons(collector); } @@ -149,9 +149,9 @@ public class VectorGeoShapeQueryProcessor { } @Override - public Void visit(org.elasticsearch.geometry.Polygon polygon) { + public Void visit(org.opensearch.geometry.Polygon polygon) { if (polygon.isEmpty() == false) { - List collector = new ArrayList<>(); + List collector = new ArrayList<>(); GeoPolygonDecomposer.decomposePolygon(polygon, true, collector); collectPolygons(collector); } @@ -166,13 +166,13 @@ public class VectorGeoShapeQueryProcessor { return null; } - private void collectLines(List geometryLines) { + private void collectLines(List geometryLines) { for (Line line: geometryLines) { geometries.add(GeoShapeUtils.toLuceneLine(line)); } } - private void collectPolygons(List geometryPolygons) { + private void collectPolygons(List geometryPolygons) { for (Polygon polygon : geometryPolygons) { geometries.add(GeoShapeUtils.toLucenePolygon(polygon)); } diff --git a/server/src/main/java/org/elasticsearch/search/DocValueFormat.java b/server/src/main/java/org/elasticsearch/search/DocValueFormat.java index 8cc75f425f0..2076bebbde1 100644 --- a/server/src/main/java/org/elasticsearch/search/DocValueFormat.java +++ b/server/src/main/java/org/elasticsearch/search/DocValueFormat.java @@ -32,7 +32,7 @@ import org.elasticsearch.common.network.NetworkAddress; import org.elasticsearch.common.time.DateFormatter; import org.elasticsearch.common.time.DateMathParser; import org.elasticsearch.common.time.DateUtils; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.index.mapper.DateFieldMapper; import org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileUtils; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorFactory.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorFactory.java index d3d8157f242..cd8f4abb95d 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorFactory.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorFactory.java @@ -20,7 +20,7 @@ package org.elasticsearch.search.aggregations.bucket.geogrid; import org.elasticsearch.common.geo.GeoBoundingBox; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.search.aggregations.Aggregator; import org.elasticsearch.search.aggregations.AggregatorFactories; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtils.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtils.java index 507f9694345..07e2b376d5e 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtils.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtils.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.util.ESSloppyMath; import org.elasticsearch.common.xcontent.ObjectParser.ValueType; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import java.io.IOException; import java.util.Locale; diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/InternalGeoHashGridBucket.java b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/InternalGeoHashGridBucket.java index 197492d6f71..31a9b085f40 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/InternalGeoHashGridBucket.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/InternalGeoHashGridBucket.java @@ -20,7 +20,7 @@ package org.elasticsearch.search.aggregations.bucket.geogrid; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.search.aggregations.InternalAggregations; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java b/server/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java index c319ba542ac..0dcad538887 100644 --- a/server/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java +++ b/server/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java @@ -49,8 +49,8 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; -import static org.elasticsearch.geometry.utils.Geohash.addNeighbors; -import static org.elasticsearch.geometry.utils.Geohash.stringEncode; +import static org.opensearch.geometry.utils.Geohash.addNeighbors; +import static org.opensearch.geometry.utils.Geohash.stringEncode; /** * A {@link ContextMapping} that uses a geo location/area as a diff --git a/server/src/test/java/org/elasticsearch/common/geo/BaseGeoParsingTestCase.java b/server/src/test/java/org/elasticsearch/common/geo/BaseGeoParsingTestCase.java index 76cae85ff4f..076241ba917 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/BaseGeoParsingTestCase.java +++ b/server/src/test/java/org/elasticsearch/common/geo/BaseGeoParsingTestCase.java @@ -21,7 +21,7 @@ package org.elasticsearch.common.geo; import org.elasticsearch.common.geo.parsers.ShapeParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.utils.GeographyValidator; import org.elasticsearch.index.mapper.GeoShapeIndexer; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions; @@ -66,14 +66,14 @@ abstract class BaseGeoParsingTestCase extends ESTestCase { ElasticsearchGeoAssertions.assertEquals(expected, ShapeParser.parse(parser).buildS4J()); } else { GeometryParser geometryParser = new GeometryParser(true, true, true); - org.elasticsearch.geometry.Geometry shape = geometryParser.parse(parser); + org.opensearch.geometry.Geometry shape = geometryParser.parse(parser); shape = new GeoShapeIndexer(true, "name").prepareForIndexing(shape); ElasticsearchGeoAssertions.assertEquals(expected, shape); } } } - protected void assertGeometryEquals(org.elasticsearch.geometry.Geometry expected, XContentBuilder geoJson) throws IOException { + protected void assertGeometryEquals(org.opensearch.geometry.Geometry expected, XContentBuilder geoJson) throws IOException { try (XContentParser parser = createParser(geoJson)) { parser.nextToken(); assertEquals(expected, new GeoJson(true, false, new GeographyValidator(false)).fromXContent(parser)); diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeoBoundingBoxTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeoBoundingBoxTests.java index 4ddd7c8f7db..071599a7903 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeoBoundingBoxTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeoBoundingBoxTests.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonParserTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonParserTests.java index 880071667e4..ca54cac037c 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonParserTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonParserTests.java @@ -25,18 +25,18 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParseException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; -import org.elasticsearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; +import org.opensearch.geometry.utils.GeographyValidator; import java.io.IOException; import java.text.ParseException; diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonSerializationTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonSerializationTests.java index de3d23f75b9..a2bb922d1d4 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonSerializationTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonSerializationTests.java @@ -30,8 +30,8 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.utils.GeographyValidator; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.utils.GeographyValidator; import org.elasticsearch.test.AbstractXContentTestCase; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonShapeParserTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonShapeParserTests.java index b1869ff7cca..108e739678a 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeoJsonShapeParserTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeoJsonShapeParserTests.java @@ -30,11 +30,11 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; import org.elasticsearch.index.mapper.ContentPath; import org.elasticsearch.index.mapper.GeoShapeIndexer; import org.elasticsearch.index.mapper.LegacyGeoShapeFieldMapper; @@ -79,7 +79,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { .endObject(); Point expected = GEOMETRY_FACTORY.createPoint(new Coordinate(100.0, 0.0)); assertGeometryEquals(new JtsPoint(expected, SPATIAL_CONTEXT), pointGeoJson, true); - assertGeometryEquals(new org.elasticsearch.geometry.Point(100d, 0d), pointGeoJson, false); + assertGeometryEquals(new org.opensearch.geometry.Point(100d, 0d), pointGeoJson, false); } @Override @@ -195,7 +195,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { .endObject(); Rectangle expected = SPATIAL_CONTEXT.makeRectangle(-50, 50, -30, 30); assertGeometryEquals(expected, multilinesGeoJson, true); - assertGeometryEquals(new org.elasticsearch.geometry.Rectangle(-50, 50, 30, -30), + assertGeometryEquals(new org.opensearch.geometry.Rectangle(-50, 50, 30, -30), multilinesGeoJson, false); // test #2: envelope that spans dateline @@ -208,7 +208,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { expected = SPATIAL_CONTEXT.makeRectangle(50, -50, -30, 30); assertGeometryEquals(expected, multilinesGeoJson, true); - assertGeometryEquals(new org.elasticsearch.geometry.Rectangle(50, -50, 30, -30), + assertGeometryEquals(new org.opensearch.geometry.Rectangle(50, -50, 30, -30), multilinesGeoJson, false); // test #3: "envelope" (actually a triangle) with invalid number of coordinates (TopRight, BottomLeft, BottomRight) @@ -264,8 +264,8 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { Polygon expected = GEOMETRY_FACTORY.createPolygon(shell, null); assertGeometryEquals(jtsGeom(expected), polygonGeoJson, true); - org.elasticsearch.geometry.Polygon p = new org.elasticsearch.geometry.Polygon( - new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.Polygon p = new org.opensearch.geometry.Polygon( + new org.opensearch.geometry.LinearRing( new double[] {100d, 101d, 101d, 100d, 100d}, new double[] {0d, 0d, 1d, 1d, 0d} )); assertGeometryEquals(p, polygonGeoJson, false); @@ -311,7 +311,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { ElasticsearchGeoAssertions.assertEquals(jtsGeom(expected), ShapeParser.parse(parser, mapperBuilder).buildS4J()); } - org.elasticsearch.geometry.Polygon p = new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.Polygon p = new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( Arrays.stream(coordinates).mapToDouble(i->i.x).toArray(), Arrays.stream(coordinates).mapToDouble(i->i.y).toArray() )); assertGeometryEquals(p, polygonGeoJson, false); @@ -863,11 +863,11 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { Polygon expected = GEOMETRY_FACTORY.createPolygon(shell, holes); assertGeometryEquals(jtsGeom(expected), polygonGeoJson, true); - org.elasticsearch.geometry.LinearRing hole = - new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.LinearRing hole = + new org.opensearch.geometry.LinearRing( new double[] {100.8d, 100.8d, 100.2d, 100.2d, 100.8d}, new double[] {0.8d, 0.2d, 0.2d, 0.8d, 0.8d}); - org.elasticsearch.geometry.Polygon p = - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.Polygon p = + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {100d, 101d, 101d, 100d, 100d}, new double[] {0d, 0d, 1d, 1d, 0d}), Collections.singletonList(hole)); assertGeometryEquals(p, polygonGeoJson, false); } @@ -911,8 +911,8 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { assertGeometryEquals(expected, multiPointGeoJson, true); assertGeometryEquals(new MultiPoint(Arrays.asList( - new org.elasticsearch.geometry.Point(100, 0), - new org.elasticsearch.geometry.Point(101, 1))), multiPointGeoJson, false); + new org.opensearch.geometry.Point(100, 0), + new org.opensearch.geometry.Point(101, 1))), multiPointGeoJson, false); } @Override @@ -983,13 +983,13 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { assertGeometryEquals(expected, multiPolygonGeoJson, true); - org.elasticsearch.geometry.LinearRing hole = new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.LinearRing hole = new org.opensearch.geometry.LinearRing( new double[] {100.8d, 100.8d, 100.2d, 100.2d, 100.8d}, new double[] {0.8d, 0.2d, 0.2d, 0.8d, 0.8d}); - org.elasticsearch.geometry.MultiPolygon polygons = new org.elasticsearch.geometry.MultiPolygon(Arrays.asList( - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.MultiPolygon polygons = new org.opensearch.geometry.MultiPolygon(Arrays.asList( + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {103d, 103d, 102d, 102d, 103d}, new double[] {2d, 3d, 3d, 2d, 2d})), - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {101d, 101d, 100d, 100d, 101d}, new double[] {0d, 1d, 1d, 0d, 0d}), Collections.singletonList(hole)))); assertGeometryEquals(polygons, multiPolygonGeoJson, false); @@ -1041,12 +1041,12 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { assertGeometryEquals(jtsGeom(withHoles), multiPolygonGeoJson, true); - org.elasticsearch.geometry.LinearRing luceneHole = - new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.LinearRing luceneHole = + new org.opensearch.geometry.LinearRing( new double[] {100.8d, 100.8d, 100.2d, 100.2d, 100.8d}, new double[] {0.8d, 0.2d, 0.2d, 0.8d, 0.8d}); - org.elasticsearch.geometry.Polygon lucenePolygons = (new org.elasticsearch.geometry.Polygon( - new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.Polygon lucenePolygons = (new org.opensearch.geometry.Polygon( + new org.opensearch.geometry.LinearRing( new double[] {100d, 101d, 101d, 100d, 100d}, new double[] {0d, 0d, 1d, 1d, 0d}), Collections.singletonList(luceneHole))); assertGeometryEquals(lucenePolygons, multiPolygonGeoJson, false); } @@ -1125,13 +1125,13 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { GeometryCollection geometryExpected = new GeometryCollection<> (Arrays.asList( new Line(new double[] {100d, 101d}, new double[] {0d, 1d}), - new org.elasticsearch.geometry.Point(102d, 2d), - new org.elasticsearch.geometry.MultiPolygon(Arrays.asList( - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + new org.opensearch.geometry.Point(102d, 2d), + new org.opensearch.geometry.MultiPolygon(Arrays.asList( + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {180d, 180d, 176d, 172d, 176d, 180d}, new double[] {-12.142857142857142d, 12.142857142857142d, 15d, 0d, -15d, -12.142857142857142d} )), - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {-180d, -180d, -177d, -177d, -180d}, new double[] {12.142857142857142d, -12.142857142857142d, -10d, 10d, 12.142857142857142d} )) @@ -1159,7 +1159,7 @@ public class GeoJsonShapeParserTests extends BaseGeoParsingTestCase { Point expected = GEOMETRY_FACTORY.createPoint(new Coordinate(100.0, 0.0)); assertGeometryEquals(new JtsPoint(expected, SPATIAL_CONTEXT), pointGeoJson, true); - org.elasticsearch.geometry.Point expectedPt = new org.elasticsearch.geometry.Point(100, 0); + org.opensearch.geometry.Point expectedPt = new org.opensearch.geometry.Point(100, 0); assertGeometryEquals(expectedPt, pointGeoJson, false); } diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeoWKTShapeParserTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeoWKTShapeParserTests.java index 1f45f2e9036..19f329dcb03 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeoWKTShapeParserTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeoWKTShapeParserTests.java @@ -40,11 +40,11 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; import org.elasticsearch.index.mapper.ContentPath; import org.elasticsearch.index.mapper.GeoShapeFieldMapper; import org.elasticsearch.index.mapper.GeoShapeIndexer; @@ -110,7 +110,7 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { Coordinate c = new Coordinate(p.lon(), p.lat()); Point expected = GEOMETRY_FACTORY.createPoint(c); assertExpected(new JtsPoint(expected, SPATIAL_CONTEXT), new PointBuilder().coordinate(c), true); - assertExpected(new org.elasticsearch.geometry.Point(p.lon(), p.lat()), new PointBuilder().coordinate(c), false); + assertExpected(new org.opensearch.geometry.Point(p.lon(), p.lat()), new PointBuilder().coordinate(c), false); assertMalformed(new PointBuilder().coordinate(c)); } @@ -122,10 +122,10 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { coordinates.add(new Coordinate(GeoTestUtil.nextLongitude(), GeoTestUtil.nextLatitude())); } - List points = new ArrayList<>(numPoints); + List points = new ArrayList<>(numPoints); for (int i = 0; i < numPoints; ++i) { Coordinate c = coordinates.get(i); - points.add(new org.elasticsearch.geometry.Point(c.x, c.y)); + points.add(new org.opensearch.geometry.Point(c.x, c.y)); } Geometry expectedGeom; @@ -275,11 +275,11 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { Polygon expected = GEOMETRY_FACTORY.createPolygon(shell, holes); assertExpected(jtsGeom(expected), polygonWithHole, true); - org.elasticsearch.geometry.LinearRing hole = - new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.LinearRing hole = + new org.opensearch.geometry.LinearRing( new double[] {100.2d, 100.8d, 100.8d, 100.2d, 100.2d}, new double[] {0.8d, 0.8d, 0.2d, 0.2d, 0.8d}); - org.elasticsearch.geometry.Polygon p = - new org.elasticsearch.geometry.Polygon(new org.elasticsearch.geometry.LinearRing( + org.opensearch.geometry.Polygon p = + new org.opensearch.geometry.Polygon(new org.opensearch.geometry.LinearRing( new double[] {101d, 101d, 100d, 100d, 101d}, new double[] {0d, 1d, 1d, 0d, 0d}), Collections.singletonList(hole)); assertExpected(p, polygonWithHole, false); assertMalformed(polygonWithHole); @@ -448,7 +448,7 @@ public class GeoWKTShapeParserTests extends BaseGeoParsingTestCase { Rectangle expected = SPATIAL_CONTEXT.makeRectangle(r.minLon, r.maxLon, r.minLat, r.maxLat); assertExpected(expected, builder, true); - assertExpected(new org.elasticsearch.geometry.Rectangle(r.minLon, r.maxLon, r.maxLat, r.minLat), builder, false); + assertExpected(new org.opensearch.geometry.Rectangle(r.minLon, r.maxLon, r.maxLat, r.minLat), builder, false); assertMalformed(builder); } diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeometryIOTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeometryIOTests.java index 4d3bf051636..c2fce8f8be2 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeometryIOTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeometryIOTests.java @@ -24,9 +24,9 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.ShapeType; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.ShapeType; import org.elasticsearch.test.ESTestCase; import static org.elasticsearch.geo.GeometryTestUtils.randomGeometry; diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeometryIndexerTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeometryIndexerTests.java index ba4191c0570..74f371e9fff 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeometryIndexerTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeometryIndexerTests.java @@ -35,17 +35,17 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.index.mapper.GeoShapeIndexer; import org.elasticsearch.test.ESTestCase; import org.locationtech.spatial4j.exception.InvalidShapeException; diff --git a/server/src/test/java/org/elasticsearch/common/geo/GeometryParserTests.java b/server/src/test/java/org/elasticsearch/common/geo/GeometryParserTests.java index 9bc216deecb..42199d0caee 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/GeometryParserTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/GeometryParserTests.java @@ -26,12 +26,12 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParseException; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; import org.elasticsearch.test.ESTestCase; import java.util.Arrays; diff --git a/server/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java b/server/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java index 192d3473b38..a597553cee8 100644 --- a/server/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java +++ b/server/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.geo.builders.MultiLineStringBuilder; import org.elasticsearch.common.geo.builders.PointBuilder; import org.elasticsearch.common.geo.builders.PolygonBuilder; import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.geometry.LinearRing; +import org.opensearch.geometry.LinearRing; import org.elasticsearch.index.mapper.GeoShapeIndexer; import org.elasticsearch.test.ESTestCase; import org.locationtech.jts.geom.Coordinate; @@ -55,7 +55,7 @@ public class ShapeBuilderTests extends ESTestCase { Point point = pb.buildS4J(); assertEquals(-100D, point.getX(), 0.0d); assertEquals(45D, point.getY(), 0.0d); - org.elasticsearch.geometry.Point geoPoint = pb.buildGeometry(); + org.opensearch.geometry.Point geoPoint = pb.buildGeometry(); assertEquals(-100D, geoPoint.getX(), 0.0d); assertEquals(45D, geoPoint.getY(), 0.0d); } @@ -68,7 +68,7 @@ public class ShapeBuilderTests extends ESTestCase { assertEquals(45D, rectangle.getMaxX(), 0.0d); assertEquals(30D, rectangle.getMaxY(), 0.0d); - org.elasticsearch.geometry.Rectangle luceneRectangle = eb.buildGeometry(); + org.opensearch.geometry.Rectangle luceneRectangle = eb.buildGeometry(); assertEquals(-45D, luceneRectangle.getMinX(), 0.0d); assertEquals(-30D, luceneRectangle.getMinY(), 0.0d); assertEquals(45D, luceneRectangle.getMaxX(), 0.0d); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/ExternalMapper.java b/server/src/test/java/org/elasticsearch/index/mapper/ExternalMapper.java index acd70df6890..b63d8b32f1b 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/ExternalMapper.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/ExternalMapper.java @@ -24,7 +24,7 @@ import org.elasticsearch.Version; import org.elasticsearch.common.collect.Iterators; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.builders.PointBuilder; -import org.elasticsearch.geometry.Point; +import org.opensearch.geometry.Point; import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.NamedAnalyzer; diff --git a/server/src/test/java/org/elasticsearch/index/mapper/GeoPointFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/GeoPointFieldMapperTests.java index ddb27febb33..2f22b2436d1 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/GeoPointFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/GeoPointFieldMapperTests.java @@ -28,7 +28,7 @@ import org.hamcrest.CoreMatchers; import java.io.IOException; import java.util.Set; -import static org.elasticsearch.geometry.utils.Geohash.stringEncode; +import static org.opensearch.geometry.utils.Geohash.stringEncode; import static org.hamcrest.Matchers.arrayWithSize; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.containsString; diff --git a/server/src/test/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapperTests.java index eb71dbf014d..b2a59cabb2f 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/LegacyGeoShapeFieldMapperTests.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.geo.SpatialStrategy; import org.elasticsearch.common.geo.builders.ShapeBuilder; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.geometry.Point; +import org.opensearch.geometry.Point; import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.TestGeoShapeFieldMapperPlugin; diff --git a/server/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java b/server/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java index f9f7ccc507e..89f89529829 100644 --- a/server/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java +++ b/server/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java @@ -32,7 +32,7 @@ import org.elasticsearch.test.geo.RandomGeoGenerator; import java.io.IOException; import java.util.function.DoubleSupplier; -import static org.elasticsearch.geometry.utils.Geohash.stringEncode; +import static org.opensearch.geometry.utils.Geohash.stringEncode; import static org.elasticsearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode; import static org.hamcrest.Matchers.is; diff --git a/server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java b/server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java index aa88000e720..3bdeb68b3a3 100644 --- a/server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java +++ b/server/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.geo.GeoUtils; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.test.ESTestCase; import org.locationtech.spatial4j.context.SpatialContext; import org.locationtech.spatial4j.distance.DistanceUtils; diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorTests.java index 7fa517807f6..75fdb5b6ba8 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridAggregatorTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.search.aggregations.bucket.geogrid; -import static org.elasticsearch.geometry.utils.Geohash.stringEncode; +import static org.opensearch.geometry.utils.Geohash.stringEncode; public class GeoHashGridAggregatorTests extends GeoGridAggregatorTestCase { diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridParserTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridParserTests.java index 71f962a2052..8e81db5b6b0 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridParserTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridParserTests.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentParseException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; public class GeoHashGridParserTests extends ESTestCase { diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridTests.java index a29d096d9f2..79766d5c765 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoHashGridTests.java @@ -18,7 +18,7 @@ */ package org.elasticsearch.search.aggregations.bucket.geogrid; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.search.aggregations.InternalAggregations; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileGridParserTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileGridParserTests.java index e2a08d8fb14..bdf5fd4926d 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileGridParserTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileGridParserTests.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.xcontent.XContentParseException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.geo.GeometryTestUtils; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; import static org.hamcrest.Matchers.containsString; diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtilsTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtilsTests.java index cf3e8699b68..973bd15d2a8 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtilsTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoTileUtilsTests.java @@ -20,7 +20,7 @@ package org.elasticsearch.search.aggregations.bucket.geogrid; import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; import static org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileUtils.MAX_ZOOM; diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractGeoTestCase.java b/server/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractGeoTestCase.java index 4e58d836683..5904f754d43 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractGeoTestCase.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractGeoTestCase.java @@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.geometry.utils.Geohash; +import org.opensearch.geometry.utils.Geohash; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoPointShapeQueryTests.java b/server/src/test/java/org/elasticsearch/search/geo/GeoPointShapeQueryTests.java index 7eb508a4c3c..849c10968d9 100644 --- a/server/src/test/java/org/elasticsearch/search/geo/GeoPointShapeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/search/geo/GeoPointShapeQueryTests.java @@ -31,12 +31,12 @@ import org.elasticsearch.common.geo.builders.MultiPointBuilder; import org.elasticsearch.common.geo.builders.PointBuilder; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.index.query.GeoShapeQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; diff --git a/server/src/test/java/org/elasticsearch/search/geo/GeoQueryTests.java b/server/src/test/java/org/elasticsearch/search/geo/GeoQueryTests.java index 89c62bab652..62d43f1511f 100644 --- a/server/src/test/java/org/elasticsearch/search/geo/GeoQueryTests.java +++ b/server/src/test/java/org/elasticsearch/search/geo/GeoQueryTests.java @@ -32,8 +32,8 @@ import org.elasticsearch.common.geo.builders.PolygonBuilder; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.index.query.GeoShapeQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.plugins.Plugin; diff --git a/server/src/test/java/org/elasticsearch/search/suggest/completion/GeoContextMappingTests.java b/server/src/test/java/org/elasticsearch/search/suggest/completion/GeoContextMappingTests.java index 36877fd995d..14186dc0fbb 100644 --- a/server/src/test/java/org/elasticsearch/search/suggest/completion/GeoContextMappingTests.java +++ b/server/src/test/java/org/elasticsearch/search/suggest/completion/GeoContextMappingTests.java @@ -40,7 +40,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import static org.elasticsearch.geometry.utils.Geohash.addNeighborsAtLevel; +import static org.opensearch.geometry.utils.Geohash.addNeighborsAtLevel; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.search.suggest.completion.CategoryContextMappingTests.assertContextSuggestFields; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchGeoAssertions.java b/server/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchGeoAssertions.java index 40b09e378a7..99eac1abeed 100644 --- a/server/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchGeoAssertions.java +++ b/server/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchGeoAssertions.java @@ -24,8 +24,8 @@ import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.parsers.ShapeParser; import org.elasticsearch.common.unit.DistanceUnit; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.MultiLine; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.MultiLine; import org.hamcrest.Matcher; import org.junit.Assert; import org.locationtech.jts.geom.Coordinate; @@ -224,7 +224,7 @@ public class ElasticsearchGeoAssertions { Assert.assertEquals(s1, s2); } else if (s1 instanceof Object[] && s2 instanceof Object[]) { Assert.assertArrayEquals((Object[]) s1, (Object[]) s2); - } else if (s1 instanceof org.elasticsearch.geometry.Geometry && s2 instanceof org.elasticsearch.geometry.Geometry) { + } else if (s1 instanceof org.opensearch.geometry.Geometry && s2 instanceof org.opensearch.geometry.Geometry) { Assert.assertEquals(s1, s2); } else { //We want to know the type of the shape because we test shape equality in a special way... @@ -246,7 +246,7 @@ public class ElasticsearchGeoAssertions { unwrapJTS(shape) instanceof MultiPolygon); } else { assertTrue("expected Polygon[] but found " + shape.getClass().getName(), - shape instanceof org.elasticsearch.geometry.MultiPolygon); + shape instanceof org.opensearch.geometry.MultiPolygon); } } @@ -256,7 +256,7 @@ public class ElasticsearchGeoAssertions { + unwrapJTS(shape).getClass().getName(), unwrapJTS(shape) instanceof Polygon); } else { assertTrue("expected Polygon but found " + shape.getClass().getName(), - shape instanceof org.elasticsearch.geometry.Polygon); + shape instanceof org.opensearch.geometry.Polygon); } } diff --git a/test/framework/src/main/java/org/elasticsearch/geo/GeometryTestUtils.java b/test/framework/src/main/java/org/elasticsearch/geo/GeometryTestUtils.java index 3b4ad5eca73..074f0fdc13b 100644 --- a/test/framework/src/main/java/org/elasticsearch/geo/GeometryTestUtils.java +++ b/test/framework/src/main/java/org/elasticsearch/geo/GeometryTestUtils.java @@ -20,18 +20,18 @@ package org.elasticsearch.geo; import org.apache.lucene.geo.GeoTestUtil; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.geometry.Geometry; -import org.elasticsearch.geometry.GeometryCollection; -import org.elasticsearch.geometry.GeometryVisitor; -import org.elasticsearch.geometry.Line; -import org.elasticsearch.geometry.LinearRing; -import org.elasticsearch.geometry.MultiLine; -import org.elasticsearch.geometry.MultiPoint; -import org.elasticsearch.geometry.MultiPolygon; -import org.elasticsearch.geometry.Point; -import org.elasticsearch.geometry.Polygon; -import org.elasticsearch.geometry.Rectangle; +import org.opensearch.geometry.Circle; +import org.opensearch.geometry.Geometry; +import org.opensearch.geometry.GeometryCollection; +import org.opensearch.geometry.GeometryVisitor; +import org.opensearch.geometry.Line; +import org.opensearch.geometry.LinearRing; +import org.opensearch.geometry.MultiLine; +import org.opensearch.geometry.MultiPoint; +import org.opensearch.geometry.MultiPolygon; +import org.opensearch.geometry.Point; +import org.opensearch.geometry.Polygon; +import org.opensearch.geometry.Rectangle; import org.elasticsearch.test.ESTestCase; import java.util.ArrayList;