@turf/bbox 4.5.2 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -9
- package/index.js +2 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -11,18 +11,11 @@ Takes a set of features, calculates the bbox of all input features, and returns
|
|
|
11
11
|
**Examples**
|
|
12
12
|
|
|
13
13
|
```javascript
|
|
14
|
-
var line =
|
|
15
|
-
"type": "Feature",
|
|
16
|
-
"properties": {},
|
|
17
|
-
"geometry": {
|
|
18
|
-
"type": "LineString",
|
|
19
|
-
"coordinates": [[-74, 40], [-78, 42], [-82, 35]]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
14
|
+
var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
|
|
22
15
|
var bbox = turf.bbox(line);
|
|
16
|
+
var bboxPolygon = turf.bboxPolygon(bbox);
|
|
23
17
|
|
|
24
18
|
//addToMap
|
|
25
|
-
var bboxPolygon = turf.bboxPolygon(bbox);
|
|
26
19
|
var addToMap = [line, bboxPolygon]
|
|
27
20
|
```
|
|
28
21
|
|
package/index.js
CHANGED
|
@@ -7,18 +7,11 @@ var coordEach = require('@turf/meta').coordEach;
|
|
|
7
7
|
* @param {FeatureCollection|Feature<any>} geojson input features
|
|
8
8
|
* @returns {Array<number>} bbox extent in [minX, minY, maxX, maxY] order
|
|
9
9
|
* @example
|
|
10
|
-
* var line =
|
|
11
|
-
* "type": "Feature",
|
|
12
|
-
* "properties": {},
|
|
13
|
-
* "geometry": {
|
|
14
|
-
* "type": "LineString",
|
|
15
|
-
* "coordinates": [[-74, 40], [-78, 42], [-82, 35]]
|
|
16
|
-
* }
|
|
17
|
-
* }
|
|
10
|
+
* var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
|
|
18
11
|
* var bbox = turf.bbox(line);
|
|
12
|
+
* var bboxPolygon = turf.bboxPolygon(bbox);
|
|
19
13
|
*
|
|
20
14
|
* //addToMap
|
|
21
|
-
* var bboxPolygon = turf.bboxPolygon(bbox);
|
|
22
15
|
* var addToMap = [line, bboxPolygon]
|
|
23
16
|
*/
|
|
24
17
|
module.exports = function (geojson) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/bbox",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.3",
|
|
4
4
|
"description": "turf bbox module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Turfjs/turf",
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@turf/helpers": "^4.
|
|
34
|
+
"@turf/helpers": "^4.7.3",
|
|
35
35
|
"benchmark": "^2.1.4",
|
|
36
36
|
"tape": "^4.6.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@turf/meta": "^4.
|
|
39
|
+
"@turf/meta": "^4.7.3"
|
|
40
40
|
}
|
|
41
41
|
}
|