Class: Key

jsts.index.quadtree.Key

new Key(itemEnv)

A Key is a unique identifier for a node in a quadtree. It contains a lower-left point and a level number. The level number is the power of two for the size of the node envelope.
Parameters:
Name Type Description
itemEnv jsts.geom.Envelope the envelope of the key.
Source:

Methods

(static) computeQuadLevel(env) → {Number}

Computes the quad-level for specified envelope
Parameters:
Name Type Description
env jsts.geom.Envelope the envelope to calculate level for.
Source:
Returns:
The calculated level.
Type
Number

computeKey()

Will call appropriate computeKey* method depending on arguments.
Source:

computeKeyFromEnvelope(env)

Computes the key from specified envlope.
Parameters:
Name Type Description
env jsts.geom.Envelope the envelope.
Source:

computeKeyFromLevel(level, env)

Computes a key from a level and an envelope
Parameters:
Name Type Description
level Number the level.
env jsts.geom.Envelope the envelope.
Source:

getCentre() → {jsts.geom.Coordinate}

Gets the centre of this key
Source:
Returns:
the center-point.
Type
jsts.geom.Coordinate

getEnvelope() → {jsts.geom.Envelope}

Gets the envelope of this key
Source:
Returns:
The envelope.
Type
jsts.geom.Envelope

getLevel() → {Number}

Gets the level of this key
Source:
Returns:
The level.
Type
Number

getPoint() → {jsts.geom.Coordinate}

Gets the point of this key.
Source:
Returns:
The point.
Type
jsts.geom.Coordinate