@turf/buffer 7.0.0-alpha.1 → 7.0.0-alpha.2

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/dist/es/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import center from '@turf/center';
2
- import { GeoJSONReader, BufferOp, GeoJSONWriter } from '@turf/jsts';
2
+ import jsts from '@turf/jsts';
3
3
  import { featureEach, geomEach } from '@turf/meta';
4
4
  import { geoAzimuthalEquidistant } from 'd3-geo';
5
5
  import { featureCollection, earthRadius, radiansToLength, lengthToRadians, feature } from '@turf/helpers';
6
6
 
7
+ const { BufferOp, GeoJSONReader, GeoJSONWriter } = jsts;
8
+
7
9
  /**
8
10
  * Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
9
11
  *
package/dist/js/index.js CHANGED
@@ -9,6 +9,9 @@ var helpers = require('@turf/helpers');
9
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
10
 
11
11
  var center__default = /*#__PURE__*/_interopDefaultLegacy(center);
12
+ var jsts__default = /*#__PURE__*/_interopDefaultLegacy(jsts);
13
+
14
+ const { BufferOp, GeoJSONReader, GeoJSONWriter } = jsts__default['default'];
12
15
 
13
16
  /**
14
17
  * Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
@@ -104,11 +107,11 @@ function bufferFeature(geojson, radius, units, steps) {
104
107
  };
105
108
 
106
109
  // JSTS buffer operation
107
- var reader = new jsts.GeoJSONReader();
110
+ var reader = new GeoJSONReader();
108
111
  var geom = reader.read(projected);
109
112
  var distance = helpers.radiansToLength(helpers.lengthToRadians(radius, units), "meters");
110
- var buffered = jsts.BufferOp.bufferOp(geom, distance, steps);
111
- var writer = new jsts.GeoJSONWriter();
113
+ var buffered = BufferOp.bufferOp(geom, distance, steps);
114
+ var writer = new GeoJSONWriter();
112
115
  buffered = writer.write(buffered);
113
116
 
114
117
  // Detect if empty geometries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/buffer",
3
- "version": "7.0.0-alpha.1",
3
+ "version": "7.0.0-alpha.2",
4
4
  "description": "turf buffer module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -55,7 +55,7 @@
55
55
  "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
56
56
  },
57
57
  "devDependencies": {
58
- "@turf/truncate": "^7.0.0-alpha.1",
58
+ "@turf/truncate": "^7.0.0-alpha.2",
59
59
  "benchmark": "*",
60
60
  "load-json-file": "*",
61
61
  "npm-run-all": "*",
@@ -65,13 +65,13 @@
65
65
  "write-json-file": "*"
66
66
  },
67
67
  "dependencies": {
68
- "@turf/bbox": "^7.0.0-alpha.1",
69
- "@turf/center": "^7.0.0-alpha.1",
70
- "@turf/helpers": "^7.0.0-alpha.1",
68
+ "@turf/bbox": "^7.0.0-alpha.2",
69
+ "@turf/center": "^7.0.0-alpha.2",
70
+ "@turf/helpers": "^7.0.0-alpha.2",
71
71
  "@turf/jsts": "^2.7.1",
72
- "@turf/meta": "^7.0.0-alpha.1",
73
- "@turf/projection": "^7.0.0-alpha.1",
72
+ "@turf/meta": "^7.0.0-alpha.2",
73
+ "@turf/projection": "^7.0.0-alpha.2",
74
74
  "d3-geo": "1.7.1"
75
75
  },
76
- "gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
76
+ "gitHead": "dd35b52725945b4fa29a98d9a550733e06cc222e"
77
77
  }