분류, 패키지 및 저장소 검색

패키지 상세v0.6.1

latlong

일반적인 위도 및 경도 계산을 위한 가벼운 라이브러리

30일 다운로드
2.1천
좋아요
116
Pub 점수
10

패키지 설치

flutter pub add latlong

패키지 개요

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

효율적인 위도 및 경도 계산을 위한 가벼운 Dart 라이브러리입니다. 거리 계산, 중점 결정, 좌표 변환과 같은 기본 지리공간 연산을 제공합니다. 무거운 종속성 없이 기초 지리 수학이 필요한 애플리케이션에 적합합니다. 패키지는 간단하게 통합할 수 있으며 위치 기반 논리를 필요로 하는 모바일 및 웹 앱에 적합합니다. 최소한의 오버헤드로 핵심 지오로케이션 유틸리티를 지원합니다.

사용 사례

  • 두 좌표 사이의 거리 계산
  • 위치 사이의 중점 찾기
  • 좌표 형식 간 변환
  • 위치 기반 필터 구현
  • 내비게이션 도우미 만들기
  • 지오펜싱 로직

주요 기능

  • 최소한의 프로필
  • 하버신 거리 지원
  • 좌표 산술
  • 간편한 통합
  • 외부 종속성 없음
  • 크로스 플랫폼 호환성

적합한 대상

  • 위치 기능이 있는 모바일 앱
  • 웹 매핑 도구
  • 간단한 지리공간 계산
  • 프로토타입 위치 논리
  • 경량 위치 정보 유틸리티가 필요한 앱

고려 사항

  • 기본 지리공간 수학에 국한됨
  • 지도 렌더링 지원 없음
  • 복잡한 투영을 처리하지 않음
  • 고급 지리정보시스템(GIS) 작업에 부적합
  • 내장된 지오코딩 없음
  • 경계 사례에 대한 수동 처리가 필요합니다

원본 README

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

DEPRECATED


This package will not be maintained anymore!

The whole thing landed on TypeScript

Check out the lib on npmjs


LatLong provides a lightweight library for common latitude and longitude calculation.

This library supports both, the "Haversine" and the "Vincenty" algorithm.

"Haversine" is a bit faster but "Vincenty" is far more accurate!

LatLong

Catmull-Rom algorithm is used for smoothing out the path.

Basic usage

Distance
    final Distance distance = new Distance();
    
    // km = 423
    final int km = distance.as(LengthUnit.Kilometer,
     new LatLng(52.518611,13.408056),new LatLng(51.519475,7.46694444));
    
    // meter = 422591.551
    final int meter = distance(
        new LatLng(52.518611,13.408056),
        new LatLng(51.519475,7.46694444)
        );

Offset

    final Distance distance = const Distance();
    final num distanceInMeter = (EARTH_RADIUS * math.PI / 4).round();
    
    final p1 = new LatLng(0.0, 0.0);
    final p2 = distance.offset(p1, distanceInMeter, 180);
    
    // LatLng(latitude:-45.219848, longitude:0.0)
    print(p2.round());
    
    // 45° 13' 11.45" S, 0° 0' 0.00" O
    print(p2.toSexagesimal());
            

Path smoothing

    // zigzag is a list of coordinates
    final Path path = new Path.from(zigzag);
    
    // Result is below
    final Path steps = path.equalize(8,smoothPath: true);

Smooth path

Features and bugs

Please file feature requests and bugs at the issue tracker.

License

Copyright 2015 Michael Mitterer (office@mikemitterer.at),
IT-Consulting and Development Limited, Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language
governing permissions and limitations under the License.

If this plugin is helpful for you - please (Circle) me or star this repo here on GitHub

카테고리

의존성

의존성 목록 4 개

  • console_log_handler>=1.1.0 <2.0.0
  • intl>=0.15.0 <1.0.0
  • logging>=0.11.3 <1.0.0
  • validate^1.0.0

소스 저장소

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