Go to the documentation of this file.
8 package net.sf.geographiclib;
69 private double _lat0, _lon0, _lat1, _lon1;
70 private static int transit(
double lon1,
double lon2) {
78 lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
79 (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
89 lon1 = lon1 % 720.0; lon2 = lon2 % 720.0;
90 return ( ((lon2 >= 0 && lon2 < 360) || lon2 < -360 ? 0 : 1) -
91 ((lon1 >= 0 && lon1 < 360) || lon1 < -360 ? 0 : 1) );
121 _perimetersum.
Set(0);
123 _lat0 = _lon0 = _lat1 = _lon1 = Double.NaN;
141 _perimetersum.
Add(
g.s12);
163 _perimetersum.
Add(
g.s12);
168 _lat1 =
g.lat2; _lon1 =
g.lon2;
211 if ((crossings & 1) != 0)
226 else if (tempsum.
Sum() < 0)
261 double perimeter = _perimetersum.
Sum();
274 i != 0 ? _lon0 :
lon);
281 if ((crossings & 1) != 0)
282 tempsum += (tempsum < 0 ? 1 : -1) *
_area0/2;
291 else if (tempsum <= -
_area0/2)
296 else if (tempsum < 0)
329 double perimeter = _perimetersum.
Sum() +
s;
344 crossings +=
transit(
g.lon2, _lon0);
347 if ((crossings & 1) != 0)
348 tempsum += (tempsum < 0 ? 1 : -1) *
_area0/2;
357 else if (tempsum <= -
_area0/2)
362 else if (tempsum < 0)
GeodesicData Direct(double lat1, double lon1, double azi1, double s12)
static int transit(double lon1, double lon2)
GeodesicData Inverse(double lat1, double lon1, double lat2, double lon2)
const EIGEN_DEVICE_FUNC SignReturnType sign() const
PolygonArea(Geodesic earth, boolean polyline)
static final int LONGITUDE
static Pair AngDiff(double x, double y)
static double AngNormalize(double x)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
PolygonResult TestPoint(double lat, double lon, boolean reverse, boolean sign)
static final int LATITUDE
static final int LONG_UNROLL
void g(const string &key, int i)
void AddPoint(double lat, double lon)
PolygonResult TestEdge(double azi, double s, boolean reverse, boolean sign)
void AddEdge(double azi, double s)
void reverse(const MatrixType &m)
static final int DISTANCE
PolygonResult Compute(boolean reverse, boolean sign)
static int transitdirect(double lon1, double lon2)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:45