패키지, 저장소 및 앱 카테고리 검색

패키지 상세v3.0.0

mgrs_dart

WGS84 위도/경도와 MGRS 좌표 간 변환을 위한 유틸리티 (proj4js/mgrs의 Dart 버전).

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
120만
좋아요
7
Pub 점수
160

패키지 설치

flutter pub add mgrs_dart

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

mgrs_dart 패키지는 WGS84 위도/경도 좌표와 군사 그리드 참조 시스템(MGRS) 좌표 간 변환을 위한 Dart 구현을 제공합니다. proj4js/mgrs의 기능을 그대로 재현하도록 설계되어 정확하고 효율적인 지리공간 변환을 제공합니다. 군사 또는 지리적 맥락에서 정밀한 위치 참조가 필요한 애플리케이션에 적합하며, Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다. 이 패키지는 가볍고 Flutter 프로젝트에 원활하게 통합됩니다.

사용 사례

  • 군사 및 방위 응용 프로그램
  • 지리공간 데이터 처리
  • 위치 기반 매핑 도구
  • 필드 데이터 수집 시스템
  • 다중 플랫폼 간 좌표 표준화

주요 기능

  • 정확한 WGS84에서 MGRS로의 변환
  • 모든 주요 플랫폼 지원
  • 경량이며 통합이 쉬움
  • 양방향 좌표 변환
  • 오픈소스이며 지속적으로 유지 관리되고 있습니다

적합한 대상

  • 지오스페이셜 데이터를 다루는 개발자
  • MGRS 기준을 요구하는 응용 프로그램
  • 좌표계 변환을 필요로 하는 Flutter 앱
  • 현장 운영 또는 군사 물류와 관련된 프로젝트

고려 사항

  • MGRS 좌표계에 대한 이해가 필요합니다
  • WGS84 및 MGRS 변환에 한정
  • 다른 좌표계에 대한 지원 없음
  • MGRS 정밀도가 필요한 사용 사례에 가장 적합합니다
  • 일반적인 GIS 워크플로우용으로 의도되지 않음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

mgrs_dart

Utility for converting between WGS84 lat/lng and MGRS coordinates (Dart version of proj4js/mgrs).

Installing

Add mgrs_dart to pubspec.yml (dependencies section), then run pub get to download the new dependencies.

dependencies:
  mgrs_dart: any # or the latest version on Pub

Using

Mgrs_dart has 3 methods

  • toPoint, takes an mgrs string, returns an array of [lon,lat]
  • forward, takes an array of [lon,lat] and optional accuracy and returns an mgrs string
  • inverse, takes an mgrs string and returns a bbox.
import 'package:mgrs_dart/mgrs_dart.dart';

void main() {
  var point = [-115.08209766323476, 36.236123461597515];
  var mgrsString = '11SPA7234911844';
  var accuracy = 5;

  // MGRS string to LonLat (results List<double>)
  var calculatedPoint = Mgrs.toPoint(mgrsString);
  print("Mgrs.toPoint('$mgrsString') = $calculatedPoint;");
  // Mgrs.toPoint('11SPA7234911844') = [-115.08209766323476, 36.236123461597515];

  // LonLat to MGRS string (results String)
  var calculatedMgrsString = Mgrs.forward(point, accuracy);
  print("Mgrs.forward($point, $accuracy) = '$calculatedMgrsString';");
  // Mgrs.forward([-115.08209766323476, 36.236123461597515], 5) = '11SPA7234911844';

  // MGRS string to BBOX  (results List<double>)
  var calculatedBox = Mgrs.inverse(mgrsString);
  print("Mgrs.inverse('$mgrsString') = $calculatedBox;");
  // Mgrs.inverse('11SPA7234911844') = [-115.08209766323476, 36.236123461597515, -115.08208632067898, 36.23613229376363];
}

Author

Mgrs_dart was ported from proj4js/mgrs by Gergely Padányi-Gulyás (@fegyi001) at Ulyssys Ltd, Budapest, Hungary.

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트