Geodesy class

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

Constructors

Geodesy()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bearingBetweenTwoGeoPoints(LatLng l1, LatLng l2) num
Calculate the initial bearing from point l1 to point l2.
calculateBoundingBox(LatLng centerPoint, num distanceInKm) List<LatLng>
Calculate a bounding box around a center point with a specified distance in kilometers.
calculateDestinationPoint(LatLng initialPoint, double bearingDegrees, double distanceKm) LatLng
Calculate a destination point given an initial point, bearing in degrees, and distance in kilometers.
calculateGeodesicLineIntersection(LatLng start1, LatLng end1, LatLng start2, LatLng end2) LatLng?
Calculate the intersection points of two geodesic lines defined by start and end points.
calculateMidpoint(LatLng point1, LatLng point2) LatLng
Calculate the midpoint between two geographic points.
calculatePointsAlongGreatCircle(LatLng startPoint, LatLng endPoint, int numPoints) List<LatLng>
Calculate a list of points along a great circle arc connecting two points.
calculatePolygonArea(List<LatLng> polygonPoints) double
Calculate the area of a polygon defined by a list of polygonPoints points.
calculatePolygonWithHolesArea(List<LatLng> outerPolygon, List<List<LatLng>> holes) double
Calculate the area of a polygon with holes.
calculatePolyLineLength(List<LatLng> polyLinePoints) double
Calculate the length of a polyline formed by connecting multiple points.
crossTrackDistanceTo(LatLng l1, LatLng start, LatLng end, [num? radius]) num
Calculate the signed distance from a geographic point l1 to create a circle with start start and end end points.
destinationPointByDistanceAndBearing(LatLng l, num distance, num bearing, [num? radius]) LatLng
Calculate a destination point given the starting point, distance, bearing, and optional radius.
distanceBetweenTwoGeoPoints(LatLng l1, LatLng l2, [num? radius]) num
Calculate the distance in meters between two geographic points.
equirectangularDistance(LatLng point1, LatLng point2) double
Calculate the equirectangular approximation distance between two geographic points.
finalBearingBetweenTwoGeoPoints(LatLng l1, LatLng l2) num
Calculate the final bearing from point l1 to point l2.
findPolygonCentroid(List<LatLng> polygons) LatLng
Find the centroid of a polygon defined by a list of polygons points.
getPolygonIntersection(List<LatLng> polygon1, List<LatLng> polygon2) List<LatLng>
Calculate the intersection points of two polygons represented by lists of polygon1 and polygon2 points.
getRectangleBounds(List<LatLng> polygonCoords) List<LatLng>
Calculate the bounds of a rectangle that encloses a polygon defined by a list of polygonCoords points.
greatCircleDistanceBetweenTwoGeoPoints(num lat1, num lon1, num lat2, num lon2) num
Calculate the great-circle distance between two geographic points using the Haversine formula.
intersectionByPaths(LatLng l1, LatLng l2, num b1, num b2) LatLng?
Calculate the geographic point of intersection of two paths.
isGeoPointInBoundingBox(LatLng l, LatLng topLeft, LatLng bottomRight) bool
Check if a given geographic point l is within a bounding box defined by the top-left and bottom-right corners.
isGeoPointInPolygon(LatLng l, List<LatLng> polygon) bool
Check if a given geographic point l is within a polygon defined by a list of polygon points using the even-odd rule algorithm.
midPointBetweenTwoGeoPoints(LatLng l1, LatLng l2) LatLng
Calculate the midpoint between two geographic points.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointsInRange(LatLng point, List<LatLng> pointsToCheck, num distance) List<LatLng>
Get a list of LatLng points within a specified distance from a given point.
projectPointOntoGeodesicLine(LatLng point, LatLng start, LatLng end) LatLng
Project a point onto a geodesic line.
sphericalLawOfCosinesDistance(LatLng point1, LatLng point2) double
Calculate the Spherical Law of Cosines distance between two geographic points.
toString() String
A string representation of this object.
inherited
vincentyDistance(double lat1, double lon1, double lat2, double lon2) double
Calculate the Vincenty formula for geodesic distance calculation between two geographic points.

Operators

operator ==(Object other) bool
The equality operator.
inherited