Skip to content

Commit

Permalink
Merge branch 'master' into contrib-update
Browse files Browse the repository at this point in the history
  • Loading branch information
twelch authored Aug 9, 2024
2 parents 5cf4c00 + 991415d commit e0968bd
Show file tree
Hide file tree
Showing 140 changed files with 758 additions and 370 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2.4.0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2.4.0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules

# is actually output
packages/turf/turf.min.js
packages/turf/test.example.js

pnpm-lock.yaml

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"npmClient": "pnpm",
"version": "7.0.0",
"version": "7.1.0",
"command": {
"publish": {
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-along/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/along",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf along module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-angle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/angle",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf angle module",
"author": "Turf Authors",
"contributors": [
Expand Down
14 changes: 10 additions & 4 deletions packages/turf-area/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## area

Takes one or more features and returns their area in square meters.
Calculates the geodesic area in square meters of one or more polygons.

### Parameters

* `geojson` **[GeoJSON][1]** input GeoJSON feature(s)
* `geojson` **[GeoJSON][1]** input polygon(s) as [Geometry][2], [Feature][3], or [FeatureCollection][4]

### Examples

Expand All @@ -22,11 +22,17 @@ var addToMap = [polygon]
polygon.properties.area = area
```

Returns **[number][2]** area in square meters
Returns **[number][5]** area in square meters

[1]: https://tools.ietf.org/html/rfc7946#section-3

[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[2]: https://tools.ietf.org/html/rfc7946#section-3.1

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.3

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

Expand Down
4 changes: 2 additions & 2 deletions packages/turf-area/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { earthRadius } from "@turf/helpers";
import { geomReduce } from "@turf/meta";

/**
* Takes one or more features and returns their area in square meters.
* Calculates the geodesic area in square meters of one or more polygons.
*
* @name area
* @param {GeoJSON} geojson input GeoJSON feature(s)
* @param {GeoJSON} geojson input polygon(s) as {@link Geometry}, {@link Feature}, or {@link FeatureCollection}
* @returns {number} area in square meters
* @example
* var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-area/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/area",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf area module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox-clip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox-clip",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf bbox-clip module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox-polygon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox-polygon",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf bbox-polygon module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf bbox module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bearing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bearing",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf bearing module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bezier-spline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bezier-spline",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf bezier-spline module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-clockwise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-clockwise",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-clockwise module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-concave/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-concave",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-concave module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-contains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-contains",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-contains module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-crosses/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-crosses",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-crosses module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-disjoint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-disjoint",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-disjoint module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-equal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-equal",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-equal module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-intersects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-intersects",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-intersects module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-overlap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-overlap",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-overlap module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-parallel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-parallel",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-parallel module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-point-in-polygon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-point-in-polygon",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-point-in-polygon module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-point-on-line/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-point-on-line",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-point-on-line module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-touches/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-touches",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-touches module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-valid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-valid",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-valid module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-within/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-within",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf boolean-within module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-buffer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/buffer",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf buffer module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-mean/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-mean",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf center-mean module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-median/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-median",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf center-median module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-of-mass/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-of-mass",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf center-of-mass module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf center module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-centroid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/centroid",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf centroid module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-circle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/circle",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf circle module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clean-coords/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clean-coords",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf clean-coords module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clone",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf clone module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-dbscan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Takes a set of [points][1] and partition them into clusters according to [https:
### Parameters

* `points` **[FeatureCollection][3]<[Point][1]>** to be clustered
* `maxDistance` **[number][4]** Maximum Distance between any point of the cluster to generate the clusters (kilometers only)
* `maxDistance` **[number][4]** Maximum Distance between any point of the cluster to generate the clusters (kilometers by default, see options)
* `options` **[Object][5]** Optional parameters (optional, default `{}`)

* `options.units` **[string][6]** in which `maxDistance` is expressed, can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-dbscan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type IndexedPoint = {
*
* @name clustersDbscan
* @param {FeatureCollection<Point>} points to be clustered
* @param {number} maxDistance Maximum Distance between any point of the cluster to generate the clusters (kilometers only)
* @param {number} maxDistance Maximum Distance between any point of the cluster to generate the clusters (kilometers by default, see options)
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units="kilometers"] in which `maxDistance` is expressed, can be degrees, radians, miles, or kilometers
* @param {boolean} [options.mutate=false] Allows GeoJSON input to be mutated
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-dbscan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters-dbscan",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf clusters-dbscan module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-kmeans/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters-kmeans",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf clusters-kmeans module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf clusters module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-collect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/collect",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf collect module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-combine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/combine",
"version": "7.0.0",
"version": "7.1.0",
"description": "turf combine module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
Loading

0 comments on commit e0968bd

Please sign in to comment.