You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Dart library for implementing geodesic and trigonometric calculations based on a spherical Earth model for working with points and paths such as distances, bearings and destinations
5
+
## About
6
6
7
-
## Getting Started
7
+
A Dart library for implementing geodesic and trigonometric calculations based on a spherical Earth model for working with points and paths such as distances, bearings and destinations.
8
8
9
-
### Add the following line in your `pubspec.yml` file
9
+
##How to Use Geodesy
10
10
11
-
```dart
12
-
geodesy:<latest_version>
13
-
```
14
-
15
-
### Include the widget in your dart file
16
-
17
-
```dart
18
-
import 'package:geodesy/geodesy.dart';
19
-
```
20
-
21
-
## Usage
22
-
23
-
### Geodesy()
24
-
25
-
```dart
26
-
final Geodesy geodesy = Geodesy();
27
-
```
28
-
29
-
### LatLng(double latitude, double longitude)
30
-
31
-
```dart
32
-
final LatLng l = LatLng(22.308, 114.1716);
33
-
```
34
-
35
-
## Methods
11
+
### Commands
36
12
37
-
### destinationPointByDistanceAndBearing(LatLng l, num distance, num bearing, [num radius])
38
-
39
-
Calculate a destination point given the distance and bearing. If radius is not specified, Earth radius will be used.
13
+
#### For Dart
40
14
41
15
```dart
42
-
final LatLng destinationPoint = geodesy.destinationPointByDistanceAndBearing(l3, 2400, 420.2);
The Geodesy class provides a collection of methods for performing various geodetic calculations, including distance calculations, point intersections, and more. This class is designed to work with geographical coordinates in the form of latitude and longitude.
96
40
97
-
```dart
98
-
final bool inBoundingBox = geodesy.isGeoPointInBoundingBox(l1, l2, l3);
99
-
```
41
+
Please see the details [here](doc/CLASS.md).
100
42
101
-
### intersectionByPaths(LatLng l1, LatLng l2, num b1, num b2)
43
+
##Static Methods
102
44
103
-
Calculate the geo point of intersection of two given paths
45
+
Static methods are avilable without using Geodesy instance.
104
46
105
-
```dart
106
-
final LatLng intersectionByPaths = geodesy.intersectionByPaths(l1, l2, b1, b2);
0 commit comments