Skip to main content

GeoBoundingBox

A bounding box to represent the coordinate range of a GeoJSON object.

This is useful when defining the extent of a GeoJSON object, such as the minimum and maximum coordinates of the object's Geometries, Features, or Feature Collections.

Constructors​

new GeoBoundingBox()​

new GeoBoundingBox(): GeoBoundingBox

Creates a blank GeoBoundingBox instance.

Returns​

GeoBoundingBox

new GeoBoundingBox()​

new GeoBoundingBox(bbox, projection?): GeoBoundingBox

Creates a new GeoBoundingBox instance from the given 2D bounding box.

Parameters​

ParameterType
bboxBBox2DLiteral
projection?CoordinateProjection

Returns​

GeoBoundingBox

new GeoBoundingBox()​

new GeoBoundingBox(bbox, projection?): GeoBoundingBox

Creates a new GeoBoundingBox instance from the given 3D bounding box.

Parameters​

ParameterType
bboxBBox3DLiteral
projection?CoordinateProjection

Returns​

GeoBoundingBox

new GeoBoundingBox()​

new GeoBoundingBox(input?, projection?): GeoBoundingBox

Parameters​

ParameterType
input?GeoBoundingBoxInput
projection?CoordinateProjection

Returns​

GeoBoundingBox

Properties​

projection​

projection: CoordinateProjection;

Accessors​

depth​

get depth(): number
set depth(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


east​

get east(): number
set east(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


elevation​

get elevation(): number
set elevation(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


maxAltitude​

get maxAltitude(): number
set maxAltitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


maxLatitude​

get maxLatitude(): number
set maxLatitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


maxLongitude​

get maxLongitude(): number
set maxLongitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


minAltitude​

get minAltitude(): number
set minAltitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


minLatitude​

get minLatitude(): number
set minLatitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


minLongitude​

get minLongitude(): number
set minLongitude(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


north​

get north(): number
set north(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


south​

get south(): number
set south(value): void

Parameters​

ParameterType
valuenumber

Returns​

number


west​

get west(): number
set west(value): void

Parameters​

ParameterType
valuenumber

Returns​

number

Methods​

[iterator]()​

iterator: ArrayIterator<number>

Returns​

ArrayIterator<number>


is2D()​

is2D(): boolean

Returns​

boolean


is3D()​

is3D(): boolean

Returns​

boolean


to2DEWKT()​

to2DEWKT(): string

Converts the GeoBoundingBox to a Well-Known-Text (WKT) string.

This is useful when building Spatialite query parameters.

Returns​

string


to2DPolygon()​

to2DPolygon(): PolygonLiteral<SolidPolygonPath>

Converts the GeoBoundingBox to a GeoJSON Polygon, omitting the altitude.

Returns​

PolygonLiteral<SolidPolygonPath>


toJSON()​

toJSON(): BBox2DLiteral | BBox3DLiteral

Returns​

BBox2DLiteral | BBox3DLiteral


toJSON2D()​

toJSON2D(): BBox2DLiteral

Converts the 2D GeoBoundingBox to an array literal.

Returns​

BBox2DLiteral


toJSON3D()​

toJSON3D(): BBox3DLiteral

Converts the 3D GeoBoundingBox to an array literal.

Returns​

BBox3DLiteral