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 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)
void CurrentPoint(real &lat, real &lon) const
unsigned TestEdge(real azi, real s, bool reverse, bool sign, real &perimeter, real &area) const
unsigned TestPoint(real lat, real lon, 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.
const mpreal remainder(const mpreal &x, const mpreal &y, mp_rnd_t rnd_mode=mpreal::get_default_rnd())
void AddEdge(real azi, real s)
Math::real Flattening() const
PolygonAreaT(const GeodType &earth, bool polyline=false)
Header for GeographicLib::Geodesic class.
PolygonAreaT< GeodesicExact > PolygonAreaExact
EIGEN_DEVICE_FUNC const SignReturnType sign() const
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
Header for GeographicLib::Accumulator class.
unsigned Compute(bool reverse, bool sign, real &perimeter, real &area) const
Namespace for GeographicLib.
static int transitdirect(real lon1, real lon2)
void AddPoint(real lat, real lon)
Header for GeographicLib::GeodesicExact class.
Accumulator _perimetersum
void reverse(const MatrixType &m)
Math::real MajorRadius() const
PolygonAreaT< Geodesic > PolygonArea
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T fmod(const T &a, const T &b)
static int transit(real lon1, real lon2)