Class QuadTree

Hierarchy

  • QuadTree

Constructors

  • Parameters

    • boundary: MBR
    • capacity: number
    • maxDepth: number = 10

    Returns QuadTree

Properties

boundary: MBR
capacity: number
depth: number
isDivided: boolean
maxDepth: number = 10
northEast: null | QuadTree
northWest: null | QuadTree
points: [number, number][]
southEast: null | QuadTree
southWest: null | QuadTree

Accessors

  • get pointsList(): null | [number, number][]
  • Returns null | [number, number][]

Methods

  • Parameters

    • point: [number, number]
    • boundary: MBR

    Returns boolean

  • you need a customRange object to support custom range query

    • note : this function has the SAME LOGIC as queryRange.

    Parameters

    Returns [number, number][]

    See

    customRange

  • 插入一个点

    Parameters

    • point: [number, number]

      点的坐标

    Returns boolean

    • 是否插入成功
  • Parameters

    Returns boolean

  • 四叉树范围查询

    • 输入一个矩形范围,返回范围内的所有点
    • 同时支持平面坐标系和经纬度坐标系(跨界线、边界、大范围区域会有 BUG)

    Parameters

    Returns [number, number][]

  • 剖分当前节点

    Returns void

Generated using TypeDoc