Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alrico88/bbox-helper-functions
Helper functions to convert BBoxes to multiple formats
https://github.com/alrico88/bbox-helper-functions
bbox geojson sql
Last synced: 3 months ago
JSON representation
Helper functions to convert BBoxes to multiple formats
- Host: GitHub
- URL: https://github.com/alrico88/bbox-helper-functions
- Owner: alrico88
- Created: 2020-09-23T14:55:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-30T16:20:43.000Z (over 1 year ago)
- Last Synced: 2024-10-11T11:18:23.179Z (4 months ago)
- Topics: bbox, geojson, sql
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/bbox-helper-functions
- Size: 904 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bbox-helper-functions
## Installation
Using npm `npm i bbox-helper-functions`
Using yarn `yarn add bbox-helper-functions`
## Usage
In CommonJS env
```javascript
const { getWKBBox } = require('bbox-helper-functions');const bbox = getWKBBox(
'POLYGON((-3.706512451171875 40.420074462890625,-3.70513916015625 40.420074462890625,-3.70513916015625 40.42144775390625,-3.706512451171875 40.42144775390625,-3.706512451171875 40.420074462890625))'
);// bbox will be [minLon, minLat, maxLon, maxLat]
```Using imports
```javascript
import { getGeohashBBox } from 'bbox-helper-functions';const geohashBBox = getGeohashBBox('ezjmun');
// geohashBBox will be [minLon, minLat, maxLon, maxLat]
```## Documentation
See [DOCS](./docs/modules.md)