gis-tools-ts - v0.6.0
    Preparing search index...

    Class KDSpatialIndex<T>

    A local KD key-value store

    Type Parameters

    • T extends Properties = Properties

    Implements

    Index

    Constructors

    • Type Parameters

      • T extends Properties = Properties

      Parameters

      • nodeSize: number = 64

        the size of each kd-tree node

      Returns KDSpatialIndex<T>

    Accessors

    • get length(): number

      Returns number

      the length of the store

    Methods

    • iterate through the values

      Returns Generator<VectorPoint<T>>

      an iterator

    • Closes the store

      Returns void

    • Get a value at index

      Parameters

      • index: number

        the position in the store to get the value from

      Returns VectorPoint<T>

      the value

    • Get a range of values within an index range

      Parameters

      • indexStart: number

        the start index

      • indexEnd: number

        the end index

      Returns VectorPoint<T>[]

      the values

    • Push a value into the store

      Parameters

      • value: VectorPoint<T>

        the value to store

      Returns void

    • Sort the store in place

      Returns void

    • iterate through the values

      Returns Generator<VectorPoint<T>>

      an iterator