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

패키지 상세v2.1.0

dart_geohash

경도/위도 및 지오해시에 대한 간단한 인코딩, 디코딩 및 이웃 찾기

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.7만
좋아요
52
Pub 점수
150

패키지 설치

flutter pub add dart_geohash

패키지 개요

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

지리 좌표를 지오해시로 인코딩하고 디코딩하는 가벼운 Dart 패키지이며, 이웃 지오해시를 찾는 기능도 제공합니다. 위도와 경도 쌍을 컴팩트한 문자열 표현으로 변환함으로써 효율적인 공간 인덱싱과 근접 쿼리를 가능하게 합니다. 이 패키지는 모든 주요 플랫폼을 지원하며 위치 기반 서비스나 지도 클러스터링과 같은 빠른 지리공간 연산이 필요한 애플리케이션에 적합합니다.

사용 사례

  • 지리공간 데이터 인덱싱
  • 위치 기반 검색
  • 맵 클러스터링
  • 근접 감지
  • 공간 쿼리 최적화

주요 기능

  • 위도/경도를 지오해시로 인코딩/디코딩
  • 인접한 지오해시 이웃 찾기
  • 최소 오버헤드로 높은 성능
  • 크로스 플랫폼 호환성
  • 간단하고 직관적인 API

적합한 대상

  • 위치 기능을 갖춘 모바일 및 웹 앱
  • 실시간 위치 추적 시스템
  • 지리공간 데이터 저장 및 검색
  • 효율적인 공간 분할이 필요한 응용 프로그램

고려 사항

  • 기본적인 지오해시 작업에 제한됨
  • 복잡한 공간 쿼리에 대한 내장 지원 없음
  • 정밀도 수준을 수동으로 처리해야 합니다
  • 대규모 지리공간 데이터베이스에 최적화되지 않음

원본 README

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

dart_geohash

GeoHash is a simple way of storing a latitude/longitude location as a simple string.

Includes a Class for encode/decode and finding neighbors as well as a Class that can be given a location and will contain all needed information for that GeoHash.

Example

// Create a simple geohash from a given string
GeoHash myHash = GeoHash("9yf0zhhtj");
// Immediately be able to get all other information related to it
myHash.geohash;
myHash.longitude();
myHash.latitude(decimalAccuracy: 4);
myHash.neighbors; // Returns a Map with itself and 8 surrounding neighbors
myHash.neighbor(Direction.NORTH);
// You can also create it from a specific lon/lat
GeoHash myOtherHash = GeoHash.fromDecimalDegrees(-98.1235, 38.1234);
// Separately you can use only the Geohasher functions
GeoHasher geoHasher = GeoHasher();
geoHasher.encode(-98, 38); // Returns a string geohash
geoHasher.encode(-98, 38, precision: 6) // Returns string geohash with length
geoHasher.decode("9yf0zhhtj"); // Returns decimal longitude/latitude
geoHasher.neighbors("9yf0zhhtj"); // Returns itself and 8 neighbors as a Map

Based on the Python Package Mapzen GeoHash

카테고리

소스 저장소

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