r_tree 1.0.4

  • README.md
  • Installing
  • Versions
  • 0

RTree Build Status

A recursive RTree library written in Dart.

"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

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 using pub serve benchmark or pub build benchmark and then serving them with your http server of choice. Click the run button and observe the output in the browser console.

API

  • RTree ( [ Number branch_factor ] )

Parameters:

  • branch_factor : optional : The maximum width of a node before a split is performed<sup>1</sup>.

Returns:

  • An empty RTree object.

RTree.insert

Parameters:

  • item : required : An item to insert into the tree.

RTree.remove

Parameters:

  • item : required : An item to remove from the RTree.

RTree.search

  • search ( Rectangle area )

Parameters:

  • area : required : An area to search within.

Returns:

  • An Iterable> of objects that overlap area.
  • Note: Rectangles that simply share a border are not considered to overlap.

Notes

<sup><a name="f1">1</a></sup> Default max node width is currently 16.

<sup><a name="f2">2</a></sup> RTreeDatum is simply a way to bind a Rectangle to an Object.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  r_tree: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:r_tree/r_tree.dart';
  
Version Uploaded Documentation Archive
1.0.4 Dec 13, 2018 Go to the documentation of r_tree 1.0.4 Download r_tree 1.0.4 archive
1.0.3 Nov 6, 2017 Go to the documentation of r_tree 1.0.3 Download r_tree 1.0.3 archive
1.0.2 Aug 17, 2017 Go to the documentation of r_tree 1.0.2 Download r_tree 1.0.2 archive
1.0.0 Jun 2, 2015 Go to the documentation of r_tree 1.0.0 Download r_tree 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <2.0.0