Skip to content

Commit 6bf1cd4

Browse files
authored
Merge pull request #40 from wingkwong/develop
Release: 0.10.1
2 parents 1d1ad6c + 63b0c02 commit 6bf1cd4

File tree

10 files changed

+92
-70
lines changed

10 files changed

+92
-70
lines changed

CHANGELOG.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,47 @@
11
# CHANGELOG
22

3+
## 0.10.1
4+
5+
- Added Example README.md
6+
- Revised Documentation Content
7+
38
## 0.10.0
49

5-
- Geodesy Refactoring
6-
- Implement Geodesic Measurements
7-
- Calculate the length of a polyline formed by connecting multiple points
8-
- Calculate the area of a polygon defined by a set of points using Shoelace formula
9-
- Implement Intersection and Projection
10-
- Calculate intersection points of two geodesic lines
11-
- Project a point onto a geodesic line
10+
- Refactored Geodesy
11+
- Implemented Geodesic Measurements
12+
- Calculating the length of a polyline formed by connecting multiple points
13+
- Calculating the area of a polygon defined by a set of points using Shoelace formula
14+
- Implemented Intersection and Projection
15+
- Calculating intersection points of two geodesic lines
16+
- Projecting a point onto a geodesic line
1217

1318
## 0.9.0
1419

15-
- Implement DistanceCalculations: EquirectangularApproximation, and SphericalLawOfCosines
16-
- Implement GeodeticPointManipulation: DestinationPoint, MidPointBetweenTwoPoints, and GreatCirclePoint
20+
- Implemented DistanceCalculations: EquirectangularApproximation, and SphericalLawOfCosines
21+
- Implemented GeodeticPointManipulation: DestinationPoint, MidPointBetweenTwoPoints, and GreatCirclePoint
1722

1823
## 0.8.0
1924

20-
- Implement Calculating Polygon Area With Hole
21-
- Implement Vincenty Formula for Geodesic Distance Calculation
22-
- Add CODE_OF_CONDUCT.md
23-
- Revise LICENSE
25+
- Implemented Calculating Polygon Area With Hole
26+
- Implemented Vincenty Formula for Geodesic Distance Calculation
27+
- Added CODE_OF_CONDUCT.md
28+
- Revised LICENSE
2429

2530
## 0.7.0
2631

27-
- Refactor geodesy
28-
- Support Class & Static methods
32+
- Refactored geodesy
33+
- Supported Class & Static methods
2934

3035
## 0.6.0
3136

32-
- Add findPolygonCentroid
33-
- Add getPolygonIntersection
37+
- Added findPolygonCentroid
38+
- Added getPolygonIntersection
3439

3540
## 0.5.0
3641

37-
- Add greatCircleDistanceBetweenTwoGeoPoints
38-
- Add getRectangleBounds
39-
- Add calculateBoundingBox
42+
- Added greatCircleDistanceBetweenTwoGeoPoints
43+
- Added getRectangleBounds
44+
- Added calculateBoundingBox
4045

4146
## 0.4.2
4247

File renamed without changes.

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,32 @@ dart pub add geodesy
2222
flutter pub add geodesy
2323
```
2424

25-
### Import the library in your dart file
25+
### Import Geodesy
2626

2727
```dart
2828
import 'package:geodesy/geodesy.dart';
2929
```
3030

31-
### Initialization
32-
33-
```dart
34-
final Geodesy geodesy = Geodesy();
35-
```
36-
3731
## Class
3832

39-
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.
40-
41-
Please see the details [here](doc/CLASS.md).
33+
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.
4234

43-
### Example
44-
45-
Please check out [here](example/class_example.dart).
35+
Please see the [Usage](doc/CLASS.md) and [Example](example/class_example.dart).
4636

4737
## Static Methods
4838

49-
Static methods are available without using Geodesy instance.
39+
Static methods are available without using `Geodesy` instance.
40+
41+
Please see the [Usage](doc/METHODS.md) and [Example](example/static_example.dart).
5042

51-
Please see the details [here](doc/METHODS.md).
52-
### Example
43+
## License
5344

54-
Please check out [here](example/static_example.dart).
55-
## Code of Conduct
45+
This project is licensed under [MIT](./LICENSE).
5646

57-
See [here](doc/CODE_OF_CONDUCT.md).
47+
## Contributors
5848

59-
## License
49+
Thank you for your contributions! We appreciate all the contributions from the community.
6050

61-
See [here](./LICENSE).
51+
<a href="https://github.com/wingkwong/geodesy/graphs/contributors">
52+
<img src="https://contrib.rocks/image?repo=wingkwong/geodesy" />
53+
</a>

doc/CLASS.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
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.
44

55
```dart
6-
final Geodesy geodesy = Geodesy();
6+
final geodesy = Geodesy();
77
```
88

9-
Call any function which is given blow using geodesy Instance
9+
Call any function which is given below using geodesy Instance.
1010

1111
## Methods
1212

@@ -215,9 +215,7 @@ Returns a `LatLng` object representing the centroid of the polygon.
215215

216216
### Get Polygon Intersection
217217

218-
Calculate the intersection of
219-
220-
two polygons defined by their vertices.
218+
Calculate the intersection of two polygons defined by their vertices.
221219

222220
```dart
223221
List<LatLng> getPolygonIntersection(List<LatLng> polygon1, List<LatLng> polygon2)
@@ -280,16 +278,12 @@ double length = PolyLine.calculatePolyLineLength(polyLinePoints);
280278
### Polygon Area Calculation using Shoelace formula
281279

282280
```dart
283-
double polygonArea = geodesy.calculatePolygonArea(polygonPoints);
281+
double polygonArea = geodesy.calculatePolygonArea(polygonPoints);
284282
```
285283

286284
### Intersection points of two geodesic lines
287285

288286
```dart
289-
LatLng? intersection = geodesy.calculateGeodesicLineIntersection(
290-
start1, end1, start2, end2);
291-
```
292-
293-
---
294-
295-
This `Geodesy` class provides a comprehensive set of methods for performing various geodetic calculations and operations. You can use these methods to calculate distances, bearings, intersections, and more based on geographical coordinates.
287+
LatLng? intersection = geodesy.calculateGeodesicLineIntersection(
288+
start1, end1, start2, end2);
289+
```

doc/METHODS.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Static Methods
22

3-
The `Geodesy` Static Methods provides a collection of methods for performing various geodetic calculations, including distance calculations, point intersections, and more. This designed to work with geographical coordinates in the form of latitude and longitude.
3+
This `Geodesy` provides a comprehensive set of methods for performing various geodetic calculations and operations. You can use these methods to calculate distances, bearings, intersections, and more based on geographical coordinates.
44

5-
Call any Static Methods which is given below without using geodesy Instance.
5+
Call any Static Methods which is given below without using `Geodesy` Instance.
66

77
## Methods
88

@@ -113,7 +113,7 @@ BoundingBox.isGeoPointInBoundingBox(l, topLeft, bottomRight);
113113

114114
Returns `true` if the point is within the bounding box, otherwise `false`.
115115

116-
### IsGeo Point In Polygon
116+
### Is GeoPoint In Polygon
117117

118118
Check if a given point is within a polygon using the even-odd rule algorithm.
119119

@@ -272,7 +272,3 @@ double length = PolyLine.calculatePolyLineLength(polyLinePoints);
272272
LatLng? intersection = GeodesicLines.calculateGeodesicLineIntersection(
273273
start1, end1, start2, end2);
274274
```
275-
276-
---
277-
278-
This `Geodesy` provides a comprehensive set of methods for performing various geodetic calculations and operations. You can use these methods to calculate distances, bearings, intersections, and more based on geographical coordinates.

example/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Example
2+
3+
## Geodesy Class
4+
5+
Check out full examples [here](./class_example.dart).
6+
7+
```dart
8+
import 'package:geodesy/geodesy.dart';
9+
10+
void main() {
11+
final Geodesy geodesy = Geodesy();
12+
List<LatLng> polygon = [
13+
const LatLng(0, 0),
14+
const LatLng(4, 0),
15+
const LatLng(4, 4),
16+
const LatLng(0, 4)
17+
];
18+
LatLng centroid = geodesy.findPolygonCentroid(polygon);
19+
// Centroid: 2.0, 2.0
20+
print("Centroid: ${centroid.latitude}, ${centroid.longitude}");
21+
}
22+
```
23+
24+
## Static Methods
25+
26+
Check out full examples [here](./static_example.dart).
27+
28+
```dart
29+
import 'package:geodesy/geodesy.dart';
30+
31+
void main() {
32+
List<LatLng> polygon = [
33+
const LatLng(0, 0),
34+
const LatLng(4, 0),
35+
const LatLng(4, 4),
36+
const LatLng(0, 4)
37+
];
38+
final LatLng centroid = PolygonCentroid.findPolygonCentroid(polygon);
39+
// Centroid: 2.0, 2.0
40+
print("Centroid: ${centroid.latitude}, ${centroid.longitude}");
41+
}
42+
```

example/static_example.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
import 'package:geodesy/geodesy.dart';
2-
import 'package:geodesy/src/core/GeodesicMeasurements/polygon_area_by_points.dart';
3-
import 'package:geodesy/src/core/GeodesicMeasurements/polyline_length_by_multiple_points.dart';
4-
import 'package:geodesy/src/core/GeodeticPointManipulation/calculate_destination_point.dart';
5-
import 'package:geodesy/src/core/GeodeticPointManipulation/calculate_points_along_great_circle.dart';
6-
import 'package:geodesy/src/core/GeodeticPointManipulation/mid_point_between_two_points.dart';
7-
import 'package:geodesy/src/core/IntersectionAndProjection/geodesic_lines.dart';
82

93
void main() {
104
// Calculate Bounding Box

lib/src/geodesy.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:geodesy/geodesy.dart';
22

3-
///Geodesy class that acts as a wrapper for various geodetic calculations. This class provides a
3+
/// Geodesy class that acts as a wrapper for various geodetic calculations. This class provides a
44
/// wide range of geo-spatial functionalities, from calculating distances and bearings to working
55
/// with polygons, points, and lines. This can be a valuable utility for geo-spatial applications
66
class Geodesy {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: geodesy
22
description: A Dart library for geodesic and trigonometric calculations working with points and paths
3-
version: 0.10.0
3+
version: 0.10.1
44
homepage: https://github.com/wingkwong/geodesy
55

66
environment:

test/geodesy_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ void main() {
376376
expect(length, equals(111319.0));
377377
});
378378

379-
///
380379
test('Lines are parallel and do not intersect', () {
381380
// Create two parallel lines with no intersection
382381
LatLng start1 = const LatLng(0.0, 0.0);

0 commit comments

Comments
 (0)