Class: SIRtree

jsts.index.strtree.SIRtree

new SIRtree(nodeCapacityopt)

Parameters:
Name Type Attributes Description
nodeCapacity number <optional>
Source:

Extends

Members

(protected) root :jsts.index.strtree.AbstractNode

Type:
Inherited From:
Source:

Methods

boundablesAtLevel2(level, topopt, boundablesopt) → (nullable) {Array}

Parameters:
Name Type Attributes Description
level number
top jsts.index.strtree.AbstractNode <optional>
boundables Array <optional>
Inherited From:
Source:
Returns:
Type
Array

build()

Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. Can only be called once, and thus can be called only after all of the data has been inserted into the tree.
Inherited From:
Source:

compareDoubles(a, b) → {number}

Parameters:
Name Type Description
a number
b number
Inherited From:
Source:
Returns:
Type
number

(protected) createNode(level) → {AbstractNode}

Parameters:
Name Type Description
level number
Overrides:
Source:
Returns:
Type
AbstractNode

createParentBoundables()

Sorts the childBoundables then divides them into groups of size M, where M is the node capacity.
Inherited From:
Source:

depth() → {number}

Inherited From:
Source:
Returns:
Type
number

depth2(nodeopt) → {number}

Parameters:
Name Type Attributes Description
node jsts.index.strtree.AbstractNode <optional>
Inherited From:
Source:
Returns:
Type
number

getComparator() → {Comparator}

Overrides:
Source:
Returns:
Type
Comparator

getIntersectsOp() → {jsts.index.strtree.AbstractSTRtree.IntersectOp}

Overrides:
Source:
Returns:
Type
jsts.index.strtree.AbstractSTRtree.IntersectOp

getNodeCapacity()

Returns the maximum number of child nodes that a node may have return {number}
Inherited From:
Source:

getRoot() → {jsts.index.strtree.AbstractNode}

Inherited From:
Source:
Returns:
Type
jsts.index.strtree.AbstractNode

insert(x1, x2, item)

Inserts an item having the given bounds into the tree.
Parameters:
Name Type Description
x1 number
x2 number
item Object
Overrides:
Source:

itemsTree() → {Array}

Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree.

The returned Lists contain either Object items, or Lists which correspond to subtrees of the tree Subtrees which do not contain any items are not included.

Builds the tree if necessary.

Inherited From:
Source:
Returns:
a List of items and/or Lists.
Type
Array

lastNode(nodes) → {jsts.index.strtree.AbstractNode}

Parameters:
Name Type Description
nodes Array
Inherited From:
Source:
Returns:
Type
jsts.index.strtree.AbstractNode

query(x1, x2opt) → {Array}

Returns items whose bounds intersect the given bounds.
Parameters:
Name Type Attributes Description
x1 number possibly equal to x2.
x2 number <optional>
Overrides:
Source:
Returns:
Type
Array

remove(searchBounds, nodeopt) → {boolean}

Removes an item from the tree. (Builds the tree, if necessary.)
Parameters:
Name Type Attributes Description
searchBounds Object
node jsts.index.strtree.AbstractNode <optional>
Inherited From:
Source:
Returns:
Type
boolean

removeItem(node, item) → {boolean}

Parameters:
Name Type Description
node jsts.index.strtree.AbstractNode
item Object
Inherited From:
Source:
Returns:
Type
boolean

size() → {number}

Inherited From:
Source:
Returns:
Type
number

size2(nodeopt) → {number}

Parameters:
Name Type Attributes Description
node jsts.index.strtree.AbstractNode <optional>
Inherited From:
Source:
Returns:
Type
number