KDBush 1.0.11

KDBush - fast spatial index for points, based on JS implementation https://github.com/mourner/kdbush

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

kdbush

C# KD-Bush implementation

Build status

Based on this JavaScript implementation by Vladimir Agafonkin

KD-Bush is a very fast static spatial index for 2D points based on a flat KD-tree.
Compared to RBush:

  • points only — no rectangles
  • static — you can't add/remove items
  • indexing is 5-8 times faster

Usage

using KDBush

KDBush<int> kdbush = new KDBush<int>();

List<Point<int>> points = new List<Point<int>>(){
    new Point<int>(54, 1, 0),
    new Point<int>(97, 21, 1)
};

kdbush.Index(points);

// Get all points that lie inside the rectangle 
// (20, 30)-(50, 70)
var result = kdbush.Query(20, 30, 50, 70);

// Get all points that lie inside the circle 
// centered at (50, 50) with radius 20
result = kdbush.Query(50, 50, 20);

kdbush

C# KD-Bush implementation

Build status

Based on this JavaScript implementation by Vladimir Agafonkin

KD-Bush is a very fast static spatial index for 2D points based on a flat KD-tree.
Compared to RBush:

  • points only — no rectangles
  • static — you can't add/remove items
  • indexing is 5-8 times faster

Usage

using KDBush

KDBush<int> kdbush = new KDBush<int>();

List<Point<int>> points = new List<Point<int>>(){
    new Point<int>(54, 1, 0),
    new Point<int>(97, 21, 1)
};

kdbush.Index(points);

// Get all points that lie inside the rectangle 
// (20, 30)-(50, 70)
var result = kdbush.Query(20, 30, 50, 70);

// Get all points that lie inside the circle 
// centered at (50, 50) with radius 20
result = kdbush.Query(50, 50, 20);

Release Notes

Templatize the tree to support any type of user data.

Dependencies

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KDBush:

Package Downloads
Transformations.NET
Transformations.NET - transforms coordinates between various coordinate systems used in Bulgaria.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.11 1,300 1/4/2018
1.0.0 446 12/24/2017