Enyim.Collections.RTree 1.0.5

RTree - fast spatial index. From https://github.com/enyim/RTree, based on JS implementation https://github.com/mourner/rbush

Install-Package Enyim.Collections.RTree -Version 1.0.5
dotnet add package Enyim.Collections.RTree --version 1.0.5
<PackageReference Include="Enyim.Collections.RTree" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Enyim.Collections.RTree --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

RTree

C# RTree implementation

Build status

Forked from https://github.com/enyim/RTree to fix bugs and add a nuget package
C# port based on this JavaScript implementation by Vladimir Agafonkin.

RTree is a very fast spatial data structure and index.

Usage

using Enyim.Collections;

RTree<Line> rtree = new RTree<Line>();

// Bulk insertion (2-3x faster than 1 by 1 insertion)
List<RTreeNode<Line>> nodes = new List<RTreeNode<Line>>();
Line l = new Line(0, 0, 10, 10);
nodes.Add(new RTreeNode<Line>(
    l, 
    new Envelope((int)Math.Min(l.X1, l.X2), (int)Math.Min(l.Y1, l.Y2), (int)Math.Max(l.X1, l.X2), (int)Math.Max(l.Y1, l.Y2))
    ));

rtree.Load(nodes);

// One-off insertion
rtree.Insert(l, new Envelope(...));

// Search
var results = rtree.Search(new Envelope(0, 0, 1, 1));

foreach (var result in results)
{
    Line l = result.Data;
    ...
}

RTree

C# RTree implementation

Build status

Forked from https://github.com/enyim/RTree to fix bugs and add a nuget package
C# port based on this JavaScript implementation by Vladimir Agafonkin.

RTree is a very fast spatial data structure and index.

Usage

using Enyim.Collections;

RTree<Line> rtree = new RTree<Line>();

// Bulk insertion (2-3x faster than 1 by 1 insertion)
List<RTreeNode<Line>> nodes = new List<RTreeNode<Line>>();
Line l = new Line(0, 0, 10, 10);
nodes.Add(new RTreeNode<Line>(
    l, 
    new Envelope((int)Math.Min(l.X1, l.X2), (int)Math.Min(l.Y1, l.Y2), (int)Math.Max(l.X1, l.X2), (int)Math.Max(l.Y1, l.Y2))
    ));

rtree.Load(nodes);

// One-off insertion
rtree.Insert(l, new Envelope(...));

// Search
var results = rtree.Search(new Envelope(0, 0, 1, 1));

foreach (var result in results)
{
    Line l = result.Data;
    ...
}

Release Notes

First release

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.5 562 1/31/2018