GeoPolyLine extends GeoObject { public double getLengthMeters() { double meters = 0.0; GeoPoint prevPoint = points.get(0); for (final GeoPoint point : points) { meters += new GeoLine(prevPoint, point).getLengthMeters(); prevPoint = point; } return meters; } 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 testGetLengthMeters() { LOG.info("testGetLengthMeters"); final GeoPoint o = new GeoPoint(-0.5, 10.0); final GeoPoint x1 = new GeoPoint(0.5, 10.0); final GeoPoint x2 = new GeoPoint(1.5, 10.0); final GeoPolyLine poly = new GeoPolyLine(Lists.asList(o, x1, new GeoPoint[]{x2})); final double len1 = Geo.METERS_PER_DEGREE_LAT * 2.0; final double len2 = poly.getLengthMeters(); Assert.assertEquals(0, Double.compare(len1, len2)); }