geodesy 0.12.0
geodesy: ^0.12.0 copied to clipboard
A Dart library for geodesic and trigonometric calculations working with points and paths
Changelog #
All notable changes to this project are documented in this file.
0.12.0 #
Breaking changes #
- Changed equirectangular and spherical law of cosines distances to return meters. Spherical law of cosines distances previously returned kilometers.
- Corrected equirectangular calculations to convert coordinates to radians.
- Changed polygon area calculations from planar degree-squared values to spherical square meters.
- Changed geodesic intersection calculations to operate on finite, shorter great-circle segments.
- Invalid or undefined geodesics now throw
ArgumentError.
Fixed #
- Bounded Vincenty iteration and reported non-convergence for antipodal and nearly antipodal points instead of hanging.
- Handled coincident, equatorial, dateline, and polar Vincenty cases.
- Validated non-finite and out-of-range Vincenty coordinates.
- Clamped spherical law of cosines input to avoid floating-point domain errors.
- Wrapped distance calculations correctly across the antimeridian.
- Calculated polygon areas with short great-circle edges on a sphere with a radius of 6,371,000 meters.
- Made polygon-hole subtraction independent of ring winding.
- Returned the unique intersection of two finite great-circle segments, including shared endpoints; disjoint, coincident, and overlapping segments return
null. - Projected points onto infinite great circles using vector geometry.
- Rejected identical or antipodal geodesic endpoints and projections without a unique result.
Tests #
- Added regression coverage for distance units, radian conversion, Vincenty convergence, polygon areas and holes, geodesic intersections, and projections.
0.11.0 #
Changed #
- Raised the minimum Dart SDK version from 3.0.0 to 3.2.0.
- Updated
latlong2to^0.10.0. - Updated
lintsto^6.0.0andtestto^1.31.2. - Updated the package version and SDK constraints for current Dart tooling.
0.10.2 #
Added #
- Added numeric extension getters for conversions between metric units.
- Added conversions for inches, feet, yards, miles, and nautical miles.
- Added astronomical-unit, light-year, parsec, and submillimeter conversions.
- Added square-meter and square-kilometer conversions.
Fixed #
- Corrected polygon area multiplication in the shoelace formula.
0.10.1 #
Documentation #
- Added
example/README.mdwith runnable usage guidance. - Revised the main README and class and method reference documents.
- Corrected documentation wording, formatting, and examples.
- Moved the code of conduct to the repository root.
Changed #
- Removed unused imports and unnecessary example output.
- Applied minor source formatting cleanup.
0.10.0 #
Added #
- Added
calculatePolyLineLengthfor measuring a path through multiple points. - Added
calculatePolygonAreafor polygon area calculations. - Added
calculateGeodesicLineIntersectionfor geodesic intersections. - Added
projectPointOntoGeodesicLinefor projecting a point onto a geodesic. - Added initial-bearing support to the intersection and projection module.
- Added class and static examples for the expanded API.
Changed #
- Reorganized core implementations by distance, bounds, polygon, point-manipulation, and intersection responsibilities.
- Expanded the
Geodesyfacade to expose the new calculations. - Updated documentation and tests for the reorganized API.
0.9.0 #
Added #
- Added distance calculations using the equirectangular approximation.
- Added distance calculations using the spherical law of cosines.
- Added
calculateDestinationPointfor distance-and-bearing offsets. - Added midpoint calculation between two geographic points.
- Added generation of points along a great-circle path.
- Added class and static API coverage for the new calculations.
Changed #
- Grouped distance calculations under dedicated source modules.
- Expanded examples, API documentation, and tests.
0.8.0 #
Added #
- Added WGS-84 geodesic distance calculations using Vincenty's inverse formula.
- Added polygon-with-holes area calculations.
- Added a
toRadiansnumeric extension used by geodesic calculations. - Added class and static entry points for the new calculations.
- Added examples and tests for Vincenty distance and polygon holes.
- Added a code of conduct.
Changed #
- Updated the license text and supporting documentation.
- Revised destination-point calculations and formatting.
0.7.0 #
Changed #
- Split the monolithic implementation into focused core classes for bearings, bounds, distances, destinations, polygons, ranges, and tracks.
- Kept the
Geodesyclass as a facade over the new core modules. - Added direct static method access alongside instance-based calls.
- Reorganized public exports through the core library barrel.
Documentation #
- Added separate class-based and static-method API guides.
- Added examples for both calling styles.
- Reworked the README around the refactored API.
0.6.0 #
Added #
- Added
findPolygonCentroidusing the polygon's signed area and vertices. - Added
getPolygonIntersectionto collect intersections between polygon edges. - Added internal segment-intersection and point-on-segment helpers.
- Added examples, README guidance, and tests for both polygon operations.
0.5.0 #
Added #
- Added
greatCircleDistanceBetweenTwoGeoPointsusing the haversine formula. - Added
getRectangleBoundsfor finding a polygon's rectangular extent. - Added
calculateBoundingBoxaround a center point and distance. - Added examples and tests for distance and bounding-box calculations.
Changed #
- Simplified bounding-box implementation details.
- Expanded the README with the new APIs and example output.
0.4.2 #
Fixed #
- Improved numeric handling across destination, midpoint, bearing, distance, intersection, and bounding-box calculations.
- Reduced repeated trigonometric work by reusing intermediate values.
- Updated tests for revised numeric results and types.
Documentation #
- Revised README descriptions and examples for the calculation APIs.
0.4.1 #
Fixed #
- Renamed the misspelled
isGeoPointInBoudingBoxAPI toisGeoPointInBoundingBox. - Corrected bounding-box containment comparisons for latitude and longitude.
- Updated tests, examples, and README references to the corrected method.
0.4.0 #
Changed #
- Completed the stable null-safety migration.
- Added Dart 3 compatibility and raised the minimum SDK version to 3.0.0.
- Migrated the coordinate dependency to
latlong2. - Removed deprecated fields left from the pre-null-safety API.
- Used const
LatLngvalues where possible. - Revised the test suite for the updated SDK and dependency APIs.
0.4.0-nullsafety.0 #
Changed #
- Migrated library source, examples, and tests to sound null safety.
- Added nullable return types where calculations may not produce a point.
- Published a prerelease for consumers testing null-safe Dart applications.
0.3.2 #
Added #
- Added the first automated test suite for core geodesy calculations.
- Added
pointsInRangefor filtering points within a given distance. - Added test coverage and README documentation for range filtering.
- Added test and coverage configuration to the package.
0.3.1 #
Changed #
- Made Earth-radius parameters optional where a default radius is available.
- Enabled stricter static analysis with an analysis options file.
- Added the
pedanticlint dependency. - Added explicit return types and numeric casts required by stricter analysis.
- Updated examples for the optional-radius API.
0.3.0 #
Changed #
- Replaced the package's own coordinate implementation with
LatLngfrom thelatlongpackage. - Updated every public calculation to accept the dependency's
LatLngtype. - Updated examples and package exports for the new coordinate type.
Deprecated #
- Deprecated the package-local
LatLngimplementation. - Deprecated
degreesToRadiansandradiansToDegreesin favor of dependency utilities.
0.2.0 #
Added #
- Added
intersectionByPathsfor finding the intersection of two paths from their start points and bearings. - Added
crossTrackDistanceTofor measuring distance from a point to a path. - Added
isGeoPointInPolygonusing ray casting. - Exported and documented all three calculations.
0.1.1 #
0.1.0 #
Added #
- Published the initial package release.
- Added the package-local
LatLngcoordinate type. - Added point-to-point distance calculations.
- Added destination-point calculations from distance and bearing.
- Added initial and final bearing calculations.
- Added midpoint calculations.
- Added bounding-box containment checks.