10 #if !defined(GEOGRAPHICLIB_POLYGONAREA_HPP) 11 #define GEOGRAPHICLIB_POLYGONAREA_HPP 1 64 template <
class GeodType = Geodesic>
76 static int transit(real lon1, real lon2) {
86 lon1 <= 0 && lon2 > 0 && lon12 > 0 ? 1 :
87 (lon2 <= 0 && lon1 > 0 && lon12 < 0 ? -1 : 0);
99 #if GEOGRAPHICLIB_CXX11_MATH && GEOGRAPHICLIB_PRECISION != 4 100 using std::remainder;
101 lon1 = remainder(lon1,
real(720)); lon2 = remainder(lon2,
real(720));
102 return ( (lon2 >= 0 && lon2 < 360 ? 0 : 1) -
103 (lon1 >= 0 && lon1 < 360 ? 0 : 1) );
107 return ( ((lon2 >= 0 && lon2 < 360) || lon2 < -360 ? 0 : 1) -
108 ((lon1 >= 0 && lon1 < 360) || lon1 < -360 ? 0 : 1) );
122 , _area0(_earth.EllipsoidArea())
123 , _polyline(polyline)
124 , _mask(GeodType::LATITUDE | GeodType::LONGITUDE | GeodType::DISTANCE |
125 (_polyline ? GeodType::NONE :
126 GeodType::AREA | GeodType::LONG_UNROLL))
137 _lat0 = _lon0 = _lat1 = _lon1 =
Math::NaN();
178 real& perimeter, real& area)
const;
205 unsigned TestPoint(real lat, real lon,
bool reverse,
bool sign,
206 real& perimeter, real& area)
const;
231 unsigned TestEdge(real azi, real s,
bool reverse,
bool sign,
232 real& perimeter, real& area)
const;
290 #endif // GEOGRAPHICLIB_POLYGONAREA_HPP static T AngNormalize(T x)
Math::real Flattening() const
unsigned TestEdge(real azi, real s, bool reverse, bool sign, real &perimeter, real &area) const
PolygonAreaT< Rhumb > PolygonAreaRhumb
static T AngDiff(T x, T y, T &e)
Header for GeographicLib::Rhumb and GeographicLib::RhumbLine classes.
void AddEdge(real azi, real s)
PolygonAreaT(const GeodType &earth, bool polyline=false)
Header for GeographicLib::Geodesic class.
PolygonAreaT< GeodesicExact > PolygonAreaExact
Math::real MajorRadius() const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 fmod(const bfloat16 &a, const bfloat16 &b)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
Header for GeographicLib::Accumulator class.
EIGEN_DEVICE_FUNC const SignReturnType sign() const
Namespace for GeographicLib.
unsigned TestPoint(real lat, real lon, bool reverse, bool sign, real &perimeter, real &area) const
unsigned Compute(bool reverse, bool sign, real &perimeter, real &area) const
static int transitdirect(real lon1, real lon2)
void AddPoint(real lat, real lon)
void CurrentPoint(real &lat, real &lon) const
Header for GeographicLib::GeodesicExact class.
Accumulator _perimetersum
void reverse(const MatrixType &m)
PolygonAreaT< Geodesic > PolygonArea
static int transit(real lon1, real lon2)