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
new GeoBoundingBox()
new GeoBoundingBox(bbox, projection?): GeoBoundingBox
Creates a new GeoBoundingBox instance from the given 2D bounding box.
Parameters
Parameter | Type |
---|---|
bbox | BBox2DLiteral |
projection ? | CoordinateProjection |
Returns
new GeoBoundingBox()
new GeoBoundingBox(bbox, projection?): GeoBoundingBox
Creates a new GeoBoundingBox instance from the given 3D bounding box.
Parameters
Parameter | Type |
---|---|
bbox | BBox3DLiteral |
projection ? | CoordinateProjection |
Returns
new GeoBoundingBox()
new GeoBoundingBox(input?, projection?): GeoBoundingBox
Parameters
Parameter | Type |
---|---|
input ? | GeoBoundingBoxInput |
projection ? | CoordinateProjection |
Returns
Properties
projection
projection: CoordinateProjection;
Accessors
depth
get depth(): number
set depth(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
east
get east(): number
set east(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
elevation
get elevation(): number
set elevation(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
maxAltitude
get maxAltitude(): number
set maxAltitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
maxLatitude
get maxLatitude(): number
set maxLatitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
maxLongitude
get maxLongitude(): number
set maxLongitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
minAltitude
get minAltitude(): number
set minAltitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
minLatitude
get minLatitude(): number
set minLatitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
minLongitude
get minLongitude(): number
set minLongitude(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
north
get north(): number
set north(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
south
get south(): number
set south(value): void
Parameters
Parameter | Type |
---|---|
value | number |
Returns
number
west
get west(): number
set west(value): void
Parameters
Parameter | Type |
---|---|
value | number |
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
toJSON2D()
toJSON2D(): BBox2DLiteral
Converts the 2D GeoBoundingBox to an array literal.
Returns
toJSON3D()
toJSON3D(): BBox3DLiteral
Converts the 3D GeoBoundingBox to an array literal.