dart_hk1980 1.0.2 copy "dart_hk1980: ^1.0.2" to clipboard
dart_hk1980: ^1.0.2 copied to clipboard

HK1980 (EPSG:2326) to WGS84 (EPSG:4326) coordinate transformations for Dart.

dart_hk1980 #

A converter for transforming Hong Kong 1980 Grid (HK1980 / EPSG:2326) coordinates into WGS84 latitude/longitude (EPSG:4326).


✨ Features #

  • 🔁 Convert HK1980 Grid (EPSG:2326)WGS84 (EPSG:4326)
  • 🎯 Geographic accuracy: within 2 meters
  • 📐 Uses:
    • International 1924 ellipsoid
    • Official Hong Kong LandsD TM parameters
    • HK80 → WGS84 offsets (–5.5″ latitude, +8.8″ longitude)
  • 🧩 Pure Dart implementation (no native dependencies)

Usage Example #

import 'package:dart_hk1980/dart_hk1980.dart';

void main() {
  // HK1980 Grid coordinates (X = easting, Y = northing)
  final hk1980 = [838901.9031, 832049.1549];

  // Convert to WGS84 latitude/longitude
  final wgs84 = Hk1980Converter.toWgs84(
    easting: hk1980[0],
    northing: hk1980[1],
  );

  print('HK1980 $hk1980 → WGS84 $wgs84');
}

📦 Installation #

Add this to your pubspec.yaml:

dependencies:
  dart_hk1980: ^1.0.2
1
likes
160
points
33
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

HK1980 (EPSG:2326) to WGS84 (EPSG:4326) coordinate transformations for Dart.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

vector_math

More

Packages that depend on dart_hk1980