Class: Node

jsts.index.quadtree.Node

new Node(env, level)

Represents a node of a Quadtree. Nodes contain items which have a spatial extent corresponding to the node's position in the quadtree.
Parameters:
Name Type Description
env jsts.geom.Envelope Envelope to initialize from.
level Number The level.
Source:
Requires:
  • module:jsts/index/quadtree/NodeBase.js

Requires

  • module:jsts/index/quadtree/NodeBase.js

Methods

(static) createExpanded(node, addEnv) → {jsts.index.quadtree.Node}

Creates an expanded node.
Parameters:
Name Type Description
node jsts.index.quadtree.Node the node to create a new node from.
addEnv jsts.geom.Envelope the envelope.
Source:
Returns:
the created node.
Type
jsts.index.quadtree.Node

(static) createNode(env) → {jsts.index.quadtree.Node}

Creates a node from specified envelope
Parameters:
Name Type Description
env jsts.geom.Envelope the envelope.
Source:
Returns:
the created node.
Type
jsts.index.quadtree.Node

createSubnode(index) → {jsts.index.quadtree.Node}

Creates a subnode
Parameters:
Name Type Description
index Number The index (0-4) on where to create a subnode.
Source:
Returns:
the created node.
Type
jsts.index.quadtree.Node

find(searchEnv) → {jsts.index.quadtree.Node}

Returns the smallest existing node containing the envelope.
Parameters:
Name Type Description
searchEnv jsts.geom.Envelope input Envelope.
Source:
Returns:
the smallest node containing searchEnv.
Type
jsts.index.quadtree.Node

getEnvelope() → {jsts.geom.Envelope}

Gets the envelope for this node
Source:
Returns:
the envelope.
Type
jsts.geom.Envelope

getNode(searchEnv) → {jsts.index.quadtree.Node}

Returns the subquad containing the envelope. Creates the subquad if it does not already exist.
Parameters:
Name Type Description
searchEnv jsts.geom.Envelope the input envelope.
Source:
Returns:
the node containing the searchEnv.
Type
jsts.index.quadtree.Node

getSubnode(index) → {jsts.index.quadtree.Node}

get the subquad for the index. If it doesn't exist, create it
Parameters:
Name Type Description
index Number the index of the subnode to get.
Source:
Returns:
the specified subnode.
Type
jsts.index.quadtree.Node

insertNode(node)

Inserts a child-node
Parameters:
Name Type Description
node jsts.index.quadtree.Node to insert.
Source:

isSearchMatch(searchEnv) → {Boolean}

Checks wheter the provided envelope intersects this nodes envelope.
Parameters:
Name Type Description
searchEnv jsts.geom.Envelope the envelope to search.
Source:
Returns:
True if searchEnv intersects this nodes envelope.
Type
Boolean