r_tree 1.0.3

  • README.md
  • Installing
  • Versions
  • 86

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

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.

1. Depend on it

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


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

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
79 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80 / 100
Overall score:
Weighted score of the above. [more]
86

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • 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.

Dependencies

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