Package Exports
- bbox-helper-functions
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bbox-helper-functions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Classes
- BBoxFunctions
Typedefs
- BBox :
Array.<number>
[minLon, minLat, maxLon, maxLat]
- Coordinate :
Array.<number>
[latitude, longitude]
- CornersBBox
- GeoJSONPolygon
- GeoJSONFeature
BBoxFunctions
Kind: global class
- BBoxFunctions
- new BBoxFunctions()
- .BBoxToCorners(bbox) ⇒
CornersBBox
- .BBoxToWK(bbox, [type]) ⇒
string
|Buffer
- .BBoxToGeoJSONPolygon(bbox) ⇒
GeoJSONPolygon
- .BBoxToGeoJSONFeature(bbox, [properties]) ⇒
GeoJSONFeature
- .getGeoJSONBBox(geojson) ⇒
BBox
- .getWKBBox(wk, [type]) ⇒
BBox
- .getBBoxSQLSentence(bbox, latitudeCol, longitudeCol) ⇒
string
new BBoxFunctions()
Compendium of methods to manipulate BBoxes
BBoxFunctions.BBoxToCorners(bbox) ⇒ CornersBBox
Converts BBox to corners object, getting coordinates for sw, nw, ne, se
Kind: static method of BBoxFunctions
Returns: CornersBBox
- The object representing the corners of the bounding box
Param | Type | Description |
---|---|---|
bbox | BBox |
The bounding box to convert |
BBoxFunctions.BBoxToWK(bbox, [type]) ⇒ string
| Buffer
Converts a bounding box to a WKT string
Kind: static method of BBoxFunctions
Returns: string
| Buffer
- The well-known representation of the bounding box
Param | Type | Default | Description |
---|---|---|---|
bbox | BBox |
The bounding box to convert | |
[type] | 'wkt' | 'wkb' |
"wkt" |
Well-known type |
BBoxFunctions.BBoxToGeoJSONPolygon(bbox) ⇒ GeoJSONPolygon
Converts bounding box to a GeoJSON Polygon geometry
Kind: static method of BBoxFunctions
Returns: GeoJSONPolygon
- The GeoJSON polygon geometry representation
Param | Type | Description |
---|---|---|
bbox | BBox |
The bounding box to convert |
BBoxFunctions.BBoxToGeoJSONFeature(bbox, [properties]) ⇒ GeoJSONFeature
Converts bounding box to a GeoJSON Polygon feature
Kind: static method of BBoxFunctions
Returns: GeoJSONFeature
- GeoJSON feature
Param | Type | Default | Description |
---|---|---|---|
bbox | BBox |
The bounding box to convert | |
[properties] | object |
{} |
Properties to embed in GeoJSON feature |
BBoxFunctions.getGeoJSONBBox(geojson) ⇒ BBox
Gets the bounding box of any GeoJSON
Kind: static method of BBoxFunctions
Returns: BBox
- The GeoJSON bounding box
Param | Type | Description |
---|---|---|
geojson | object |
GeoJSON to get bounding box of |
BBoxFunctions.getWKBBox(wk, [type]) ⇒ BBox
Converts WKT or WKB to BBox
Kind: static method of BBoxFunctions
Returns: BBox
- The resulting bounding box
Param | Type | Default | Description |
---|---|---|---|
wk | string | Buffer |
Well-known representation to get bounding box of | |
[type] | 'wkt' | 'wkb' |
'wkt' |
Type of well-known representation |
BBoxFunctions.getBBoxSQLSentence(bbox, latitudeCol, longitudeCol) ⇒ string
Gets SQL sentence to query by bounding box Assumes latitude and longitude are in separate columns
Kind: static method of BBoxFunctions
Returns: string
- The SQL sentence
Param | Type | Description |
---|---|---|
bbox | BBox |
The bounding box to convert to SQL sentence |
latitudeCol | string |
The latitude column name |
longitudeCol | string |
The longitude column name |
BBox : Array.<number>
[minLon, minLat, maxLon, maxLat]
Coordinate : Array.<number>
[latitude, longitude]
CornersBBox
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
sw | Coordinate |
[lat, lon] for south-west corner |
nw | Coordinate |
[lat, lon] for north-west corner |
ne | Coordinate |
[lat, lon] for north-east corner |
se | Coordinate |
[lat, lon] for south-east corner |
GeoJSONPolygon
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
type | 'Polygon' |
Type of geometry |
coordinates | Array.<Array.<Coordinate>> |
Array of coordinates |
GeoJSONFeature
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
type | 'Feature' |
Type of feature |
geometry | GeoJSONPolygon |
Polygon geometry |
properties | object |
Properties of feature |