Class: KdNode

jsts.index.kdtree.KdNode

new KdNode()

A node of a KdTree, which represents one or more points in the same location. Creates a new KdNode. Will call appropriate *initialize-function depending on arguments.
Source:

Methods

getCoordinate() → {jsts.geom.Coordinate}

Returns the location of this node
Source:
Returns:
location of this node.
Type
jsts.geom.Coordinate

getCount() → {Number}

Returns the number of inserted points that are coincident at this location.
Source:
Returns:
Number of inserted points that this node represents.
Type
Number

getData() → {Object}

Gets the user data object associated with this node.
Source:
Returns:
The data of this node.
Type
Object

getLeft() → {jsts.index.kdtree.KdNode}

Returns the left node of the tree
Source:
Returns:
The left node of the tree.
Type
jsts.index.kdtree.KdNode

getRight() → {jsts.index.kdtree.KdNode}

Returns the right node of the tree
Source:
Returns:
The right node of the tree.
Type
jsts.index.kdtree.KdNode

getX() → {Number}

Returns the X coordinate of the node
Source:
Returns:
X coordinate of the node.
Type
Number

getY() → {Number}

Returns the Y coordinate of the node
Source:
Returns:
Y coordinate of the node.
Type
Number

increment()

Increments the count by 1
Source:

initializeFromCoordinate(p, data)

Creates a new KdNode.
Parameters:
Name Type Description
p jsts.geom.Coordinate point location of new node.
data Object a data objects to associate with this node.
Source:

initializeFromXY(x, y, data)

Creates a new KdNode.
Parameters:
Name Type Description
x Number coordinate of point.
y Number coordinate of point.
data Object a data objects to associate with this node.
Source:

isRepeated() → {Boolean}

Tests whether more than one point with this value have been inserted (up to the tolerance)
Source:
Returns:
true if more than one point have been inserted with this value.
Type
Boolean

setLeft(left)

Sets the left node value
Parameters:
Name Type Description
left jsts.index.kdtree.KdNode The node to be inserted as left.
Source:

setRight(right)

Sets the right node value
Parameters:
Name Type Description
right jsts.index.kdtree.KdNode The node to be inserted as right.
Source: