bbox-helper-functions / Exports
- BBoxToCorners
- BBoxToGeoJSONFeature
- BBoxToGeoJSONPolygon
- BBoxToWKT
- getBBoxPostGISSentence
- getBBoxSQLSentence
- getDatasetBBox
- getGeoJSONBBox
- getGeohashBBox
- getGeohashesInBBox
- getWKTBBox
- isBBoxInsideBBox
- isPointInsideBBox
Ƭ AccessorFunction: (item
: any) => number
▸ (item
: any): number
Name | Type |
---|---|
item |
any |
Returns: number
Defined in: models/DatasetOptions.ts:1
Ƭ BBox: [number, number, number, number]
Defined in: modules/bbox.ts:1
▸ BBoxToCorners(bbox
: BBox): Corners
Gets corners from a bbox
export
Name | Type | Description |
---|---|---|
bbox |
BBox | BBox to get corners of |
Returns: Corners
The corners as [lat, lon] coordinates
Defined in: modules/helpers.ts:87
▸ BBoxToGeoJSONFeature(bbox
: BBox, properties?
: GeoJsonProperties): Feature<Polygon>
Name | Type |
---|---|
bbox |
BBox |
properties |
GeoJsonProperties |
Returns: Feature<Polygon>
Defined in: modules/geojson.ts:21
▸ BBoxToGeoJSONPolygon(bbox
: BBox): Polygon
Name | Type |
---|---|
bbox |
BBox |
Returns: Polygon
Defined in: modules/geojson.ts:8
▸ BBoxToWKT(bbox
: BBox): string
Converts a BBox to WKT
export
Name | Type | Description |
---|---|---|
bbox |
BBox | The BBox to convert to WKT |
Returns: string
The resulting WKT
Defined in: modules/wk.ts:14
▸ getBBoxPostGISSentence(bbox
: BBox): string
Creates a PostGIS bounding box expression from a BBox
Name | Type | Description |
---|---|---|
bbox |
BBox | The BBox to convert to a polygon |
Returns: string
The SQL sentences
Defined in: modules/sql.ts:40
▸ getBBoxSQLSentence(bbox
: BBox, latitudeCol
: string, longitudeCol
: string): string
Gets a SQL sentence to use to filter a BBox Checks if a certain column value is inside a BBox
export
Name | Type | Description |
---|---|---|
bbox |
BBox | The BBox to use as filter |
latitudeCol |
string | The latitude column name |
longitudeCol |
string | The longitude column name |
Returns: string
The SQL sentence
Defined in: modules/sql.ts:15
▸ getDatasetBBox(dataset
: any[], datasetOptions?
: DatasetOptions): BBox
Gets the BBox of an array of objects
export
Name | Type | Description |
---|---|---|
dataset |
any[] | Dataset to find BBox of |
datasetOptions |
DatasetOptions | - |
Returns: BBox
The dataset's bbox
Defined in: modules/datasets.ts:26
▸ getGeoJSONBBox(geojson
: GeoJSON): BBox
Name | Type |
---|---|
geojson |
GeoJSON |
Returns: BBox
Defined in: modules/geojson.ts:29
▸ getGeohashBBox(geohash
: string): BBox
Gets the BBox of a given geohash
export
Name | Type | Description |
---|---|---|
geohash |
string | Geohash to find BBox of |
Returns: BBox
The BBox of the geohash
Defined in: modules/geohash.ts:16
▸ getGeohashesInBBox(bbox
: BBox, precision
: number): string[]
Gets all the geohashes inside a BBox
export
Name | Type | Description |
---|---|---|
bbox |
BBox | The BBox |
precision |
number | Precision for the geohashes |
Returns: string[]
Array of geohash strings
Defined in: modules/geohash.ts:30
▸ getWKTBBox(wkt
: string): BBox
Gets the BBox of a WKT
export
Name | Type | Description |
---|---|---|
wkt |
string | The WKT to get BBox of |
Returns: BBox
The WKT BBox
Defined in: modules/wk.ts:28
▸ isBBoxInsideBBox(bboxToCheck
: BBox, bboxContainer
: BBox): boolean
Checks if a BBox is completely contained in another BBox
export
Name | Type | Description |
---|---|---|
bboxToCheck |
BBox | The BBox to check if it's inside |
bboxContainer |
BBox | The BBox container |
Returns: boolean
Whether the BBox is inside the other BBox
Defined in: modules/bbox.ts:16
▸ isPointInsideBBox(point
: GeoPoint, bbox
: BBox): boolean
Checks if a point is inside a BBox
export
Name | Type | Description |
---|---|---|
point |
GeoPoint | The point to check |
bbox |
BBox | The BBox to check |
Returns: boolean
Whether the point is inside the BBox
Defined in: modules/bbox.ts:36