basic functionality

This commit is contained in:
Josh Baker 2016-06-11 17:28:47 -07:00
parent b107275c30
commit 11b677ad2c
7 changed files with 44 additions and 10 deletions

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2016 Josh Baker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

20
README.md Normal file
View File

@ -0,0 +1,20 @@
RTree implementation for Go
===========================
[![Build Status](https://travis-ci.org/tidwall/rtree.svg?branch=master)](https://travis-ci.org/tidwall/rtree)
[![GoDoc](https://godoc.org/github.com/tidwall/rtree/client?status.svg)](https://godoc.org/github.com/tidwall/rtree/client)
This package provides an in-memory R-Tree implementation for Go, useful as a spatial data structure. It has support for 1-4 dimensions, and can store and search multidimensions interchangably in the same tree.
AUTHORS
=======
* 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely
* 1994 ANCI C ported from original test code by Melinda Green
* 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook
* 2004 Templated C++ port by Greg Douglas
* 2016 Go port by Josh Baker
License
=======
RTree source code is available under the MIT License.

View File

@ -9,7 +9,6 @@ TITLE
DESCRIPTION
A Go version of the RTree algorithm.
For more information please read the comments in rtree.go
AUTHORS
@ -379,7 +378,7 @@ func DisconnectBranch(node *Node, index int) {
// Remove element by swapping with the last element to prevent gaps in array
node.branch[index] = node.branch[node.count-1]
node.branch[node.count-1].data = nil
node.count--
}

3
vendor/d1/rtree.go vendored
View File

@ -9,7 +9,6 @@ TITLE
DESCRIPTION
A Go version of the RTree algorithm.
For more information please read the comments in rtree.go
AUTHORS
@ -379,7 +378,7 @@ func DisconnectBranch(node *Node, index int) {
// Remove element by swapping with the last element to prevent gaps in array
node.branch[index] = node.branch[node.count-1]
node.branch[node.count-1].data = nil
node.count--
}

3
vendor/d2/rtree.go vendored
View File

@ -9,7 +9,6 @@ TITLE
DESCRIPTION
A Go version of the RTree algorithm.
For more information please read the comments in rtree.go
AUTHORS
@ -379,7 +378,7 @@ func DisconnectBranch(node *Node, index int) {
// Remove element by swapping with the last element to prevent gaps in array
node.branch[index] = node.branch[node.count-1]
node.branch[node.count-1].data = nil
node.count--
}

3
vendor/d3/rtree.go vendored
View File

@ -9,7 +9,6 @@ TITLE
DESCRIPTION
A Go version of the RTree algorithm.
For more information please read the comments in rtree.go
AUTHORS
@ -379,7 +378,7 @@ func DisconnectBranch(node *Node, index int) {
// Remove element by swapping with the last element to prevent gaps in array
node.branch[index] = node.branch[node.count-1]
node.branch[node.count-1].data = nil
node.count--
}

3
vendor/d4/rtree.go vendored
View File

@ -9,7 +9,6 @@ TITLE
DESCRIPTION
A Go version of the RTree algorithm.
For more information please read the comments in rtree.go
AUTHORS
@ -379,7 +378,7 @@ func DisconnectBranch(node *Node, index int) {
// Remove element by swapping with the last element to prevent gaps in array
node.branch[index] = node.branch[node.count-1]
node.branch[node.count-1].data = nil
node.count--
}