GeoPolyLine extends GeoObject { @Nonnull @Override public GeoPolyLine moveTo(@Nonnull final GeoPoint origin) { assert origin != null; final GeoLine line = new GeoLine(points.get(0), origin); final double northing = line.getNorthing() * ((origin.getLat() >= points.get(0).getLat()) ? 1 : -1); final GeoVector vector = new GeoVector(northing, line.getEasting()); return translate(vector); } GeoPolyLine(@Nonnull final List<GeoPoint> points); @SuppressWarnings({"ConstantConditions", "UnusedDeclaration"}) @Deprecated private  GeoPolyLine(); @Nonnull @Override GeoPoint getOrigin(); @Nonnull @Override GeoPoint getCenter(); @Nonnull GeoPoint getPointAtOffset(final double offsetInMeters); int size(); @Nonnull GeoPoint get(final int i); @Nonnull List<GeoLine> asLines(); @Nonnull GeoLine getLine(final int i); @Nonnull @Override GeoPolyLine translate(@Nonnull final GeoVector vector); @Nonnull @Override GeoPolyLine moveTo(@Nonnull final GeoPoint origin); double getLengthMeters(); @Override boolean canEqual(@Nonnull final Object obj); @Override boolean equals(@Nullable final Object obj); @Override int hashCode();  }
@Test public void testMoveTo() { LOG.info("testMoveTo"); final GeoPoint x1 = new GeoPoint(0.0, 179.0); final GeoPoint x2 = new GeoPoint(0.0, -179.0); final GeoPoint x3 = new GeoPoint(0.0, 0.0); final List<GeoPoint> p1 = Lists.asList(x1, new GeoPoint[]{x2, x3}); final GeoPolyLine poly = new GeoPolyLine(p1); final GeoPolyLine poly1 = poly.moveTo(new GeoPoint(2.0, -180.0)); final GeoPolyLine poly2 = poly.moveTo(new GeoPoint(-2.0, 178.0)); Assert.assertEquals(new GeoPoint(2.0, -180.0), poly1.get(0)); Assert.assertEquals(new GeoPoint(2.0, -178.0), poly1.get(1)); Assert.assertEquals(new GeoPoint(2.0, 1.0), poly1.get(2)); Assert.assertEquals(new GeoPoint(-2.0, 178.0), poly2.get(0)); Assert.assertEquals(new GeoPoint(-2.0, -180.0), poly2.get(1)); Assert.assertEquals(new GeoPoint(-2.0, -1.0), poly2.get(2)); }