@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 796 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{GeohashTree as e}from"../../../../../geohash/GeohashTree.js";import{getGeohashBounds as t,getGeohash as s}from"../../../../../geohash/geohashUtils.js";import{AAggregateSpatialIndex as o}from"./AAggregateSpatialIndex.js";class r extends o{constructor(t){super(t),this._tree=new e(this._options.fields)}put(e){throw new Error("Geohash tree does not support put")}putBounded(e,s,o){const{geohashLevel:r,spatialReference:h}=this._options,i=t(s,o,r,h);null!=i&&this._tree.putBins(e,i)}_insert(e,t,o,r){const{geohashLevel:h,spatialReference:i}=this._options,n=s(t,o,h,i);n&&this._tree.insert(e,t,o,n[0],n[1],h,r)}}export{r as GeohashSpatialIndex};