utm 0.0.1

UTM dart #

Lat Lon and UTM bidirectional converter.
translate from Python UTM library

Usage #

import 'package:utm/utm.dart';

final utm = Utm.fromLatLon(-30, -150);
print('zone: ${utm.zone}');
print('N: ${utm.northing}');
print('E: ${utm.easting}');
print('lat: ${utm.lat}');
print('lat: ${utm.lon}');

final latlon = Utm.fromUtm(utm.easting, utm.northing, utm.zoneNumber, utm.zoneLetter);
print('lat: ${latlon.lat}');
print('lon: ${latlon.lon}');

Features and bugs #

Please file feature requests and bugs at the [issue tracker][tracker].


0.0.1 #

  • Initial version, translate from Python library


import 'package:utm/utm.dart';

main() {
  final utm = UTM.fromLatLon(lat: -30, lon: -150);
  print('zone: ${utm.zone}');
  print('N: ${utm.northing}');
  print('E: ${utm.easting}');
  print('lat: ${utm.lat}');
  print('lat: ${utm.lon}');

  final latlon = UTM.fromUtm(
    easting: utm.easting,
    northing: utm.northing,
    zoneNumber: utm.zoneNumber,
    zoneLetter: utm.zoneLetter,
  print('lat: ${latlon.lat}');
  print('lon: ${latlon.lon}');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  utm: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:utm/utm.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Aug 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:utm/utm.dart.

Health suggestions

Format lib/src/constants.dart.

Run dartfmt to format lib/src/constants.dart.

Format lib/src/converter.dart.

Run dartfmt to format lib/src/converter.dart.

Format lib/src/utm_base.dart.

Run dartfmt to format lib/src/utm_base.dart.

Maintenance suggestions

The package description is too short. (-11 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
angles ^1.2.1 1.2.1
meta ^1.1.7 1.1.7
Dev dependencies
pedantic ^1.7.0
test ^1.6.0