geodesy library

Classes

BearingBetweenTwoGeoPoints
A Bearing Between Two GeoPoints class for calculating bearings between two geographical points represented by their latitude and longitude coordinates.
BoundingBox
A BoundingBox class for calculating bounding boxes and checking if a point is within a bounding box.
Circle
Circle-base GEO algorithms.
DestinationPoint
A Destination Point class for calculating destination points on the Earth's surface using the Rhumb Line Destination formula.
Distance
Calculates the distance between points.
DistanceAndBearing
A DistanceAndBearing class for calculating destination points based on a starting point, a distance, a direction (bearing), and optionally a radius.
DistanceCalculator
DistanceHaversine
Shortcut for final Distance distance = const Distance(calculator: const Haversine());
DistanceVincenty
Shortcut for final Distance distance = const Distance(calculator: const Vincenty());
EquirectangularApproximation
A Equi- Rectangular Approximation class for calculating the distance between two geographical points using the Equirectangular approximation formula.
GeodesicLines
A Geodesic Lines class for calculating geodesic lines, intersections, and projections.
Geodesy
Geodesy class that acts as a wrapper for various geodetic calculations. This class provides a wide range of geo-spatial functionalities, from calculating distances and bearings to working with polygons, points, and lines. This can be a valuable utility for geo-spatial applications
GeoPoints
GreatCirclePoint
A Great Circle Point class for calculating points along the great circle arc connecting two LatLng points.
Haversine
LatLng
Coordinates in Degrees
LengthUnit
MidPointBetweenTwoPoints
A MidPoint Between Two Points class for calculating the midpoint between two points on the Earth's surface specified by their latitude and longitude.
MutableRectangle<T extends num>
A class for representing two-dimensional axis-aligned rectangles with mutable properties.
Path<T extends LatLng>
Path of LatLng values
Point<T extends num>
A utility class for representing two-dimensional positions.
PointRange
A Point Range class for working with geographical points and ranges.
PolygonArea
A Polygon Area class for calculating the area of a polygon using the Shoelace formula.
PolygonCentroid
A Polygon Centroid class for finding the centroid of polygons.
PolygonHole
A Polygon Hole class for calculating the area of a polygon with holes.
PolygonIntersection
A PolygonIntersection class for finding the intersection points of two polygons.
PolyLine
A PolyLine class for calculating the length of a polyline formed by connecting multiple points.
Random
A generator of random bool, int, or double values.
Rectangle<T extends num>
A class for representing two-dimensional rectangles whose properties are immutable.
RectangleBounds
Rectangle Bounds class for calculating the bounding rectangle of a set of LatLng points.
SphericalLawOfCosines
A Spherical Law Of Cosines class for calculating the distance between two geographical points using the Spherical Law of Cosines formula.
TrackDistance
Track Distance class for calculating the signed distance between a geographical point and the great circle defined by a start and end point.
Vincenty
VincentyDistance
Vincenty Distance class for calculating geodesic distances between two points on the surface of an ellipsoid using the Vincenty formula.

Extensions

DegreeConversion on num
Degree Conversion Extension
RadianConversion on num
Angle Conversion Extension

Constants

e → const double
Base of the natural logarithms.
earthRadius → const double
Earth radius in meter
equatorRadius → const double
Equator radius in meter (WGS84 ellipsoid)
flattening → const double
WGS84
ln10 → const double
Natural logarithm of 10.
ln2 → const double
Natural logarithm of 2.
log10e → const double
Base-10 logarithm of e.
log2e → const double
Base-2 logarithm of e.
pi → const double
The PI constant.
polarRadius → const double
Polar radius in meter (WGS84 ellipsoid)
sqrt1_2 → const double
Square root of 1/2.
sqrt2 → const double
Square root of 2.

Functions

acos(num x) double
Converts x to a double and returns its arc cosine in radians.
asin(num x) double
Converts x to a double and returns its arc sine in radians.
atan(num x) double
Converts x to a double and returns its arc tangent in radians.
atan2(num a, num b) double
A variant of atan.
cos(num radians) double
Converts radians to a double and returns the cosine of the value.
decimal2sexagesimal(double dec) String
Converts a decimal coordinate value to sexagesimal format
degToRadian(double deg) double
Converts degree to radian
exp(num x) double
Converts x to a double and returns the natural exponent, e, to the power x.
log(num x) double
Converts x to a double and returns the natural logarithm of the value.
max<T extends num>(T a, T b) → T
Returns the larger of two numbers.
min<T extends num>(T a, T b) → T
Returns the lesser of two numbers.
normalizeBearing(double bearing) double
Convert a bearing to be within the 0 to +360 degrees range. Compass bearing is in the rangen 0° ... 360°
pow(num x, num exponent) num
Returns x to the power of exponent.
radianToDeg(double rad) double
Radian to degree
round(double value, {int decimals = 6}) double
Rounds value to given number of decimals
sexagesimal2decimal(String str) double
Converts a string coordinate value in sexagesimal format to decimal
sin(num radians) double
Converts radians to a double and returns the sine of the value.
sqrt(num x) double
Converts x to a double and returns the positive square root of the value.
tan(num radians) double
Converts radians to a double and returns the tangent of the value.
zeroPad(num number) String
Pads a number with a single zero, if it is less than 10

Typedefs

LatLngFactory = LatLng Function(double latitude, double longitude)
Necessary for creating new instances T extends LatLng (Path