Enyim.Collections.RTree 1.0.5

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.
#r "nuget: Enyim.Collections.RTree, 1.0.5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Enyim.Collections.RTree as a Cake Addin
#addin nuget:?package=Enyim.Collections.RTree&version=1.0.5

// Install Enyim.Collections.RTree as a Cake Tool
#tool nuget:?package=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;
    ...
}

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 Downloads Last updated
1.0.5 879 1/31/2018

First release