Class: GeometryProviderBase
api.GeometryProviderBase
classdesc
Base class to extend if implementing a geometry
provider class.
example
class MyGeometryProvider extends GeometryProviderBase { ...}
#
HierarchyGeometryProviderBase
#
Implements#
Constructors#
constructor• new GeometryProviderBase()
Create a new geometry provider base instance.
#
Defined inapi/GeometryProviderBase.ts:26
#
Methods#
bboxToCellIdsâ–¸ bboxToCellIds(sw
, ne
): string
[]
Convert a geodetic bounding box to the the minimum set of cell ids containing the bounding box.
description
The bounding box needs
to be sufficiently small to be contained in an area with the size
of maximally four tiles. Up to nine adjacent tiles may be returned.
#
ParametersName | Type | Description |
---|---|---|
sw | LngLat | South west corner of bounding box. |
ne | LngLat | North east corner of bounding box. |
#
Returnsstring
[]
Array of cell ids.
#
Implementation ofIGeometryProvider.bboxToCellIds
#
Defined inapi/GeometryProviderBase.ts:41
#
getAdjacentâ–¸ getAdjacent(cellId
): string
[]
Get the cell ids of all adjacent cells.
description
In the case of approximately rectangular cells
this is typically the eight orthogonally and diagonally adjacent
cells.
#
ParametersName | Type | Description |
---|---|---|
cellId | string | Id of cell. |
#
Returnsstring
[]
Array of cell ids. No specific order is guaranteed.
#
Implementation of#
Defined inapi/GeometryProviderBase.ts:56
#
getVerticesâ–¸ getVertices(cellId
): LngLat
[]
Get the vertices of a cell.
description
The vertices form an unclosed
clockwise polygon in the 2D longitude, latitude
space. No assumption on the position of the first
vertex relative to the others can be made.
#
ParametersName | Type | Description |
---|---|---|
cellId | string | Id of cell. |
#
ReturnsLngLat
[]
Unclosed clockwise polygon.
#
Implementation of#
Defined inapi/GeometryProviderBase.ts:71
#
lngLatToCellIdâ–¸ lngLatToCellId(lngLat
): string
Convert geodetic coordinates to a cell id.
#
ParametersName | Type | Description |
---|---|---|
lngLat | LngLat | Longitude, latitude to convert. |
#
Returnsstring
Cell id for the longitude, latitude.
#
Implementation ofIGeometryProvider.lngLatToCellId