talira

latlong2

Latitude and longitude calculations for Dart and Flutter: distance, offset and path smoothing

open sourceApache-2.0free

latlong2 is a lightweight Dart library for common latitude and longitude calculations. It measures distances with the faster Haversine or the more accurate Vincenty algorithm, computes an offset point from a distance and bearing, prints coordinates in sexagesimal form, and smooths a path with the Catmull-Rom algorithm. It's a maintained fork of Michael Mitterer's dart-latlong, kept up to date with Dart language changes.

Problems it solves

  • calculate the distance between two GPS coordinates in Dart
  • find a coordinate a set distance and bearing from another point in Flutter
  • smooth a recorded GPS path in a Flutter app

Features

  • distance with the Haversine or Vincenty algorithm
  • offset point from a distance and bearing
  • sexagesimal coordinate output
  • path smoothing with Catmull-Rom splines