Skip to content

Files

Latest commit

 

History

History
333 lines (192 loc) · 7.67 KB

modules.md

File metadata and controls

333 lines (192 loc) · 7.67 KB

bbox-helper-functions / Exports

bbox-helper-functions

Table of contents

Interfaces

Type aliases

Functions

Type aliases

AccessorFunction

Ƭ AccessorFunction: (item: any) => number

Type declaration:

▸ (item: any): number

Parameters:

Name Type
item any

Returns: number

Defined in: models/DatasetOptions.ts:1


BBox

Ƭ BBox: [number, number, number, number]

Defined in: modules/bbox.ts:1

Functions

BBoxToCorners

BBoxToCorners(bbox: BBox): Corners

Gets corners from a bbox

export

Parameters:

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

BBoxToGeoJSONFeature(bbox: BBox, properties?: GeoJsonProperties): Feature<Polygon>

Parameters:

Name Type
bbox BBox
properties GeoJsonProperties

Returns: Feature<Polygon>

Defined in: modules/geojson.ts:21


BBoxToGeoJSONPolygon

BBoxToGeoJSONPolygon(bbox: BBox): Polygon

Parameters:

Name Type
bbox BBox

Returns: Polygon

Defined in: modules/geojson.ts:8


BBoxToWKT

BBoxToWKT(bbox: BBox): string

Converts a BBox to WKT

export

Parameters:

Name Type Description
bbox BBox The BBox to convert to WKT

Returns: string

The resulting WKT

Defined in: modules/wk.ts:14


getBBoxPostGISSentence

getBBoxPostGISSentence(bbox: BBox): string

Creates a PostGIS bounding box expression from a BBox

Parameters:

Name Type Description
bbox BBox The BBox to convert to a polygon

Returns: string

The SQL sentences

Defined in: modules/sql.ts:40


getBBoxSQLSentence

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

Parameters:

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

getDatasetBBox(dataset: any[], datasetOptions?: DatasetOptions): BBox

Gets the BBox of an array of objects

export

Parameters:

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

getGeoJSONBBox(geojson: GeoJSON): BBox

Parameters:

Name Type
geojson GeoJSON

Returns: BBox

Defined in: modules/geojson.ts:29


getGeohashBBox

getGeohashBBox(geohash: string): BBox

Gets the BBox of a given geohash

export

Parameters:

Name Type Description
geohash string Geohash to find BBox of

Returns: BBox

The BBox of the geohash

Defined in: modules/geohash.ts:16


getGeohashesInBBox

getGeohashesInBBox(bbox: BBox, precision: number): string[]

Gets all the geohashes inside a BBox

export

Parameters:

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

getWKTBBox(wkt: string): BBox

Gets the BBox of a WKT

export

Parameters:

Name Type Description
wkt string The WKT to get BBox of

Returns: BBox

The WKT BBox

Defined in: modules/wk.ts:28


isBBoxInsideBBox

isBBoxInsideBBox(bboxToCheck: BBox, bboxContainer: BBox): boolean

Checks if a BBox is completely contained in another BBox

export

Parameters:

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

isPointInsideBBox(point: GeoPoint, bbox: BBox): boolean

Checks if a point is inside a BBox

export

Parameters:

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