rtree

package module
v0.0.0-...-1bbc218 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2017 License: ISC Imports: 6 Imported by: 0

README

pair-rtree

GoDoc

A specialized hybrid 2D/3D R-Tree library for Go. It uses pair objects with geobin values. Supports KNN searching and rectangle transformations.

Experimental project. The API will likely change quite often.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = &Options{
	MaxEntries:  9,
	Transformer: nil,
}

Functions

This section is empty.

Types

type Options

type Options struct {
	MaxEntries  int
	Transformer func(minIn, maxIn [3]float64) (minOut, maxOut [3]float64)
}

type RTree

type RTree struct {
	// contains filtered or unexported fields
}

func New

func New(opts *Options) *RTree

func (*RTree) Bounds

func (tr *RTree) Bounds() (min, max [3]float64)

func (*RTree) Count

func (tr *RTree) Count() int

func (*RTree) Insert

func (tr *RTree) Insert(item pair.Pair)

func (*RTree) KNN

func (tr *RTree) KNN(pos pair.Pair, iter func(item pair.Pair, dist float64) bool) bool

func (*RTree) Load

func (tr *RTree) Load(items []pair.Pair)

func (*RTree) Remove

func (tr *RTree) Remove(item pair.Pair)

func (*RTree) Scan

func (tr *RTree) Scan(iter func(item pair.Pair) bool) bool

func (*RTree) Search

func (tr *RTree) Search(box pair.Pair, iter func(item pair.Pair) bool) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL