パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.1.0

dart_geohash

経度/緯度およびジオハッシュの簡単なエンコード、デコード、および隣接検索。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2.8万
いいね数
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

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト