Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RTree

Index

Constructors

constructor

  • new RTree(options?: { maxChildrenPerNode?: number }): RTree
  • Parameters

    • options: { maxChildrenPerNode?: number } = {}

      Options to adjust how the RTree shall be generated.

      • Optional maxChildrenPerNode?: number

        The tree will split up nodes with more than maxChildrenPerNode number of children.

    Returns RTree

Methods

batchInsert

  • batchInsert(records: Record<unknown>[]): void
  • Create a new R-Tree by inserting multiple records at once. This method uses a Hilbert curve to pack the tree.

    This method may only be applied when creating a new R-Tree. Subsequent additions to the tree must use insert().

    Parameters

    Returns void

insert

  • insert(record: Record<unknown>): void
  • Insert a single record to the RTree and re-balance the tree if it violates maxChildrenPerNode.

    Parameters

    Returns void

search

  • Find data records that overlap with the bounding box.

    Parameters

    Returns unknown[]

    List of Record["data"] from overlapped Records.