Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
bbox2extent
Advanced tools
Transform a GeoJSON bounding box into an Esri-formatted extent object.
Transform a GeoJSON bounding box into an Esri-formatted extent object.
npm install bbox2extent
var bbox2extent = require('bbox2exent')
var bbox = [100, 0, 105, 1]
var extent = bbox2extent(bbox)
// {
// xmin: 100,
// ymin: 0,
// xmax: 105,
// ymax: 1,
// spatialReference: {
// wkid: 4326,
// latestWkid: 4326
// }
// }
// -- OR --
bbox2extent(bbox, function (err, extent) {
if (err) throw err
console.log(extent)
// {
// xmin: 100,
// ymin: 0,
// xmax: 105,
// ymax: 1,
// spatialReference: {
// wkid: 4326,
// latestWkid: 4326
// }
// }
})
Also supports reverse operation (converting an extent to a bounding box) via reverse
:
var extent2bbox = require('bbox2extent').reverse
var extent = {
xmin: -108.9395,
ymin: 37.084968,
xmax: -102,
ymax: 40.8877,
spatialReference: {
wkid: 4326,
latestWkid: 4326
}
}
var bbox = extent2bbox(extent)
// [ -108.9395, 37.084968, -102, 40.8877 ]
// -- OR --
extent2bbox(extent, function (err, bbox) {
if (err) throw err
console.log(bbox)
// [ -108.9395, 37.084968, -102, 40.8877 ]
})
bbox2extent
is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the CONTRIBUTING.md file for more details.
[1.1.1] - 2015-08-03
Error
when returning errorskoopjs
orgFAQs
Transform a GeoJSON bounding box into an Esri-formatted extent object.
The npm package bbox2extent receives a total of 773 weekly downloads. As such, bbox2extent popularity was classified as not popular.
We found that bbox2extent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.