Interface: SpatialIndex

jsts.index.SpatialIndex

Methods

insert(itemEnv, item)

Adds a spatial item with an extent specified by the given Envelope to the index
Parameters:
Name Type Description
itemEnv jsts.geom.Envelope
item Object
Source:

query(searchEnv, visitoropt) → (nullable) {Array}

Queries the index for all items whose extents intersect the given search Envelope and applies an ItemVisitor to them (if provided). Note that some kinds of indexes may also return objects which do not in fact intersect the query envelope.
Parameters:
Name Type Attributes Description
searchEnv jsts.geom.Envelope the envelope to query for.
visitor jsts.index.ItemVisitor <optional>
a visitor object to apply to the items found.
Source:
Returns:
a list of the items found by the query.
Type
Array

remove(itemEnv, item) → {boolean}

Removes a single item from the tree.
Parameters:
Name Type Description
itemEnv jsts.geom.Envelope the Envelope of the item to remove.
item Object the item to remove.
Source:
Returns:
true if the item was found.
Type
boolean