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

パッケージ詳細v3.0.2

r_tree

2次元データのインデックス化と照会に使用するRツリー実装

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2万
いいね数
11
Pub ポイント
145

パッケージをインストール

flutter pub add r_tree

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

r_tree パッケージは、Dart で2次元空間データを効率的にインデックス化およびクエリするための Rツリー実装を提供します。高速な範囲検索と近隣探索を可能にし、地理座標、衝突検出、レイアウト管理などのアプリケーションに最適です。パフォーマンスと複数プラットフォームでの互換性を重視して構築されており、Android、iOS、Web、macOS、Windows、Linux をサポートしています。このパッケージは Workiva によってメンテナンスされており、pub を通じて Flutter プロジェクトとシームレスに統合できます。

用途

  • 空間データインデキシング
  • ゲームにおける衝突検出
  • 地理座標の照会
  • UI 要素ヒットテスト
  • 距離ベースの検索
  • 地図ベースのアプリケーション機能

主な機能

  • 効率的な2次元範囲クエリ
  • 最近隣検索のサポート
  • クロスプラットフォーム互換性
  • 高パフォーマンスな空間インデキシング
  • 挿入および照会のためのシンプルな API
  • スレッドセーフな操作

適している対象

  • ゲーム開発
  • GISアプリケーション
  • 空間論理を持つインタラクティブUI
  • データ可視化ツール
  • 位置認識アプリ
  • パフォーマンスが重要な空間操作

注意事項

  • 2Dデータ専用に最適
  • パーティショニングなしで非常に大きなデータセットに対して最適化されていない
  • 座標の精度を慎重に扱う必要があります
  • 一部のユースケースでは、静的またはバッチ更新されたデータに限定される
  • 組み込みの永続性サポートなし

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

RTree Build Status

A recursive RTree library written in Dart. This R-tree implementation is used to index and query two-dimensional data. Items are inserted and balanced via the RTree class and can then be queried by Rectangle. The balancing can be tweaked by modifying the branch factor of the RTree.

"R-trees are tree data structures used for spatial access methods, i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons." - http://en.wikipedia.org/wiki/R-tree

Example

Run the example app for a visual demonstration of the RTree

webdev serve example:8080

Navigate to http://localhost:8080. A canvas is drawn, click & drag on the canvas to add rectangles of various colors to your RTree, then click the search button and click & drag over an area of the canvas to search it for rectangles.

Benchmarks

Run the benchmarks in the command line (Dart VM) using:

dart benchmark/benchmarks.dart

You can also run them in a browser using dart2js. This takes an extra step since webdev will only build the web directory as of this writing. You'll also need some binary for serving a directory on a web server, the example below uses serve.

cp -R benchmark/ web
webdev build
serve build

Click the run button and observe the output in the browser console.

カテゴリー

ソースリポジトリ

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

データはまだありません。