@turf/point-on-feature 6.5.0 → 7.0.0-alpha.1
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 +7 -7
- package/dist/es/index.js +0 -0
- package/dist/js/index.js +0 -0
- package/index.d.ts +2 -1
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
Takes a Feature or FeatureCollection and returns a [Point][1] guaranteed to be on the surface of the feature.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
* Given a [Polygon][2], the point will be in the area of the polygon
|
|
10
|
+
* Given a [LineString][3], the point will be along the string
|
|
11
|
+
* Given a [Point][1], the point will the same as the input
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Parameters
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
* `geojson` **[GeoJSON][4]** any Feature or FeatureCollection
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
### Examples
|
|
18
18
|
|
|
19
19
|
```javascript
|
|
20
20
|
var polygon = turf.polygon([[
|
|
@@ -33,7 +33,7 @@ var pointOnPolygon = turf.pointOnFeature(polygon);
|
|
|
33
33
|
var addToMap = [polygon, pointOnPolygon];
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Returns **[Feature][5]
|
|
36
|
+
Returns **[Feature][5]<[Point][6]>** a point on the surface of `input`
|
|
37
37
|
|
|
38
38
|
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
39
39
|
|
package/dist/es/index.js
CHANGED
|
File without changes
|
package/dist/js/index.js
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/point-on-feature",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.1",
|
|
4
4
|
"description": "turf point-on-feature module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"exports": {
|
|
30
30
|
"./package.json": "./package.json",
|
|
31
31
|
".": {
|
|
32
|
+
"types": "./index.d.ts",
|
|
32
33
|
"import": "./dist/es/index.js",
|
|
33
34
|
"require": "./dist/js/index.js"
|
|
34
35
|
}
|
|
@@ -40,26 +41,27 @@
|
|
|
40
41
|
"index.d.ts"
|
|
41
42
|
],
|
|
42
43
|
"scripts": {
|
|
43
|
-
"bench": "
|
|
44
|
+
"bench": "tsx bench.js",
|
|
44
45
|
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
|
|
45
|
-
"docs": "
|
|
46
|
+
"docs": "tsx ../../scripts/generate-readmes",
|
|
46
47
|
"test": "npm-run-all test:*",
|
|
47
|
-
"test:tape": "
|
|
48
|
+
"test:tape": "tsx test.js"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@turf/meta": "^
|
|
51
|
-
"@turf/truncate": "^
|
|
51
|
+
"@turf/meta": "^7.0.0-alpha.1",
|
|
52
|
+
"@turf/truncate": "^7.0.0-alpha.1",
|
|
52
53
|
"benchmark": "*",
|
|
53
54
|
"npm-run-all": "*",
|
|
54
55
|
"rollup": "*",
|
|
55
|
-
"tape": "*"
|
|
56
|
+
"tape": "*",
|
|
57
|
+
"tsx": "*"
|
|
56
58
|
},
|
|
57
59
|
"dependencies": {
|
|
58
|
-
"@turf/boolean-point-in-polygon": "^
|
|
59
|
-
"@turf/center": "^
|
|
60
|
-
"@turf/explode": "^
|
|
61
|
-
"@turf/helpers": "^
|
|
62
|
-
"@turf/nearest-point": "^
|
|
60
|
+
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.1",
|
|
61
|
+
"@turf/center": "^7.0.0-alpha.1",
|
|
62
|
+
"@turf/explode": "^7.0.0-alpha.1",
|
|
63
|
+
"@turf/helpers": "^7.0.0-alpha.1",
|
|
64
|
+
"@turf/nearest-point": "^7.0.0-alpha.1"
|
|
63
65
|
},
|
|
64
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
|
|
65
67
|
}
|