bbox2extent
Transform a GeoJSON bounding box into an Esri-formatted extent object.
Install
npm install bbox2extent
Usage
var bbox2extent = var bbox = 100 0 105 1 var extent = // {// xmin: 100,// ymin: 0,// xmax: 105,// ymax: 1,// spatialReference: {// wkid: 4326,// latestWkid: 4326// }// } // -- OR --
Also supports reverse operation (converting an extent to a bounding box) via reverse
:
var extent2bbox = reversevar extent = xmin: -1089395 ymin: 37084968 xmax: -102 ymax: 408877 spatialReference: wkid: 4326 latestWkid: 4326 var bbox = // [ -108.9395, 37.084968, -102, 40.8877 ] // -- OR --
Contributing
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.