10#if !defined(GEOGRAPHICLIB_POLYGONAREA_HPP)
11#define GEOGRAPHICLIB_POLYGONAREA_HPP 1
96 template<
class GeodType = Geodesic>
107 real _lat0, _lon0, _lat1, _lon1;
108 static int transit(real lon1, real lon2);
111 static int transitdirect(real lon1, real lon2);
113 void Remainder(real& a)
const {
114 using std::remainder;
115 a = remainder(a, _area0);
118 void AreaReduce(T& area,
int crossings,
bool reverse,
bool sign)
const;
130 , _area0(_earth.EllipsoidArea())
131 , _polyline(polyline)
132 , _mask(GeodType::LATITUDE | GeodType::LONGITUDE | GeodType::DISTANCE |
133 (_polyline ? GeodType::NONE :
134 GeodType::AREA | GeodType::LONG_UNROLL))
145 _lat0 = _lon0 = _lat1 = _lon1 =
Math::NaN();
185 unsigned Compute(
bool reverse,
bool sign,
268 { lat = _lat1; lon = _lon1; }
Header for GeographicLib::Accumulator class.
GeographicLib::Math::real real
Header for GeographicLib::GeodesicExact class.
Header for GeographicLib::Geodesic class.
Header for GeographicLib::Rhumb and GeographicLib::RhumbLine classes.
Accumulator & remainder(T y)
PolygonAreaT(const GeodType &earth, bool polyline=false)
void AddPoint(real lat, real lon)
unsigned Compute(bool reverse, bool sign, real &perimeter, real &area) const
PolygonAreaT< Rhumb > PolygonAreaRhumb
void CurrentPoint(real &lat, real &lon) const
Math::real Flattening() const
Math::real EquatorialRadius() const
PolygonAreaT< Geodesic > PolygonArea
unsigned TestPoint(real lat, real lon, bool reverse, bool sign, real &perimeter, real &area) const
unsigned NumberPoints() const
void AddEdge(real azi, real s)
PolygonAreaT< GeodesicExact > PolygonAreaExact
unsigned TestEdge(real azi, real s, bool reverse, bool sign, real &perimeter, real &area) const
Namespace for GeographicLib.