mgrs_dart
3.0.0, released a year ago by an unverified publisher
Utility for converting between WGS84 lat/lng and MGRS coordinates.
What it does
Converts geographic coordinates between WGS84 latitude/longitude and Military Grid Reference System (MGRS) strings. It provides methods for forward conversion, reverse conversion to a point, and inverse conversion to a bounding box.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to work with MGRS coordinates in a Dart or Flutter application
- You are porting functionality that relies on the proj4js/mgrs library
Skip it when
- You need a full-featured mapping SDK with UI components and tile rendering
Strengths
- Simple API with three core methods: toPoint, forward, and inverse
- Pure Dart implementation supporting multiple platforms including web and mobile
Weaknesses
- Limited scope restricted strictly to MGRS and WGS84 conversions
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Simply add the dependency to pubspec.yml and import the package.
import 'package:mgrs_dart/mgrs_dart.dart';
void main() {
var point = [-115.08209766323476, 36.236123461597515];
var mgrsString = '11SPA7234911844';
var accuracy = 5;
var calculatedPoint = Mgrs.toPoint(mgrsString);
var calculatedMgrsString = Mgrs.forward(point, accuracy);
var calculatedBox = Mgrs.inverse(mgrsString);
}Alternatives
Packages that do the same job and could replace mgrs_dart.
- coordinate_converter
Convert between UTM, DMS, and DD geographic coordinates using the WGS84 model.
41Compare - haversine_distance
Calculate the distance between two latitude and longitude coordinates
38Compare
Works with
Packages commonly used together with mgrs_dart: ones it builds on, ones built on it, and its own family.
- unicodemgrs_dart depends on itLibrary providing Unicode character utilities and emoji data generated from Unicode 17.0.0
- proj4dartBuilt on mgrs_dartTransform point coordinates between different coordinate systems and datums.
- geoengineBuilt on mgrs_dartDart library for geospatial analysis, distance calculations, coordinate conversions and astronomy.