r_tree 1.0.3

  • README.md
  • Installing
  • Versions
  • 85

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


  • RTree ( [ Number branch_factor ] )


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


  • An empty RTree object.



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



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


  • search ( Rectangle area )


  • area : required : An area to search within.


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


<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:

  r_tree: "^1.0.3"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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.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


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
78 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
80 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:r_tree/r_tree.dart.


  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use r_tree.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Run dartfmt to format lib/src/r_tree/node.dart.

    Strong-mode analysis of lib/src/r_tree/non_leaf_node.dart gave the following hint:

    line: 92 col: 27
    'INFINITY' is deprecated and shouldn't be used.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <2.0.0
Dev dependencies
benchmark_harness any
coverage ^0.7.9
dart_dev ^1.7.6
dart_style 1.0.7
test ^0.12.0