GeoJSON field index backed by geohashes for point and polygon querying.
GeoFieldIndex
GeoJSON field index backed by geohashes for point and polygon querying.
Declaration
class GeoFieldIndex
Constructors
constructor
```ts
constructor(precision: number, geohashMap: Map, documents: Record): GeoFieldIndex
```
Parameters:
- `precision: number`
- `geohashMap: Map`
- `documents: Record`Members
indexState
```ts
get indexState(): GeoFieldIndexState
```loadState
```ts
loadState(fieldIndexState: IndexState): FieldIndex
```
Parameters:
- `fieldIndexState: IndexState`add
```ts
add(docId: string, geoJson: string): void
```
Parameters:
- `docId: string`
- `geoJson: string`indexValue
```ts
indexValue(docId: string, value: string): void
```
Parameters:
- `docId: string`
- `value: string`queryPoint
```ts
queryPoint(latitude: number, longitude: number): string[]
```
Parameters:
- `latitude: number`
- `longitude: number`queryPolygon
```ts
queryPolygon(polygon: PolygonCoordinates): string[]
```
Parameters:
- `polygon: PolygonCoordinates`