the store to index. May be an in memory or disk
the size of each kd-tree node
Add a properly shaped point with it's x, y, and data values
the point to be indexed
Insert an STPoint to the index
the face of the cell
the s coordinate
the t coordinate
the data associated with the point
Add a lon-lat pair to the cluster
longitude in degrees
latitude in degrees
the data associated with the point
Add all points from a reader. It will try to use the M-value first, but if it doesn't exist it will use the feature properties data
a reader containing the input data
Search the index for items within a given radius.
the query x coordinate
the query y coordinate
the radius
the maximum number of results
Search the index for items within a given radius using a spherical query. NOTE: Assumes the input points are lon-lat pairs in degrees.
longitude
latitude
max distance in meters
max number of results
the radius of the planet (Earth by default)
Search the index for items within a given bounding box.
the min x coordinate
the min y coordinate
the max x coordinate
the max y coordinate
the maximum number of results
Perform indexing of the added points.
Point Index Fast
Description
An index of cells with radius queries Assumes the data is compatible with https://open-s2.github.io/s2json/types/Properties.html Because of the nature of low level language like Javascript, using u64 is slow. This index uses f64 which Number supports. So it is fast and efficient.
Usage