spatial-index-js - v1.0.6
    Preparing search index...

    Class RTree

    RTree class

    Index

    Constructors

    • Parameters

      • m: number = 2

        minimum number of entries in a node, m should be little or equal than M.

      • M: number = 5

        maximum number of entries in a node.

      • d: number = 2

        dimension of rtree

      Returns RTree

    Properties

    m: number = 2

    the minimum number of entries per node

    M: number = 5

    the maximum number of entries per node

    root: null | RTreeNode = null

    the root of r-tree

    Methods

    • Parameters

      • data: any

        the data need delete from the rtree

      • OptionaltoMbrFunc: ToRtreeMBRFunc

        the function that convert the data to mbr toMbrFunc is optional. if not provide toMbrFunc parameter, rtree will use predefined ToRtreeMBRFunc to convert this data. the predefined ToRtreeMBRFunc should be set by calling rtree.setToMbrFunc function.

      Returns void

    • Parameters

      • node: RTreeNode

      Returns number

      get depth from node downward leaf node depth is zero.

    • Returns number

      the level of leaf node the root level is zero.

    • insert a data into rtree

      Parameters

      • data: any

        the data or object

      • OptionaltoMbrFunc: ToRtreeMBRFunc

        the function that convert the data to mbr toMbrFunc is optional. if not provide toMbrFunc parameter, rtree will use predefined ToRtreeMBRFunc to convert this data. the predefined ToRtreeMBRFunc should be set by calling rtree.setToMbrFunc function.

      Returns void

    • use mbr to search for leaf entries that check func returns true

      Parameters

      • mbr: RTreeMBR

        search mbr

      • check_func: RTreeSearchCheckFuncType

        check the entry and the mbr is matched

      Returns RTreeEntry[]

      the leaf entries that match. these entries point to records contain the target spatial data.

    • search data that overlap with mbr.

      Parameters

      Returns RTreeEntry[]

      some of leaf entries. these entries point to records contain the target spatial data.

    • Parameters

      • probe: Probe

      Returns void

    • Parameters

      • f: ToRtreeMBRFunc

      Returns void