Example usage for com.google.common.geometry S2Polyline getArclengthAngle

List of usage examples for com.google.common.geometry S2Polyline getArclengthAngle

Introduction

In this page you can find the example usage for com.google.common.geometry S2Polyline getArclengthAngle.

Prototype

public S1Angle getArclengthAngle() 

Source Link

Document

Return the angle corresponding to the total arclength of the polyline on a unit sphere.

Usage

From source file:com.bc.fiduceo.geometry.s2.BcS2TimeAxis.java

private long calculateLineDuration(S2Point intersectionStartPoint) {
    final S2Polyline offsetGeometry = createSubLineTo(intersectionStartPoint);
    final S1Angle offsetAngle = offsetGeometry.getArclengthAngle();
    return (long) (timeInterval * offsetAngle.radians() * invLength);
}