Skip to content

Commit

Permalink
7.1.0 docs (#204)
Browse files Browse the repository at this point in the history
* Upgrading docusaurus to latest version. Back porting a broken link to previous versions.

* Adding v7.1.0 documentation snapshot.
  • Loading branch information
smallsaucepan authored Oct 2, 2024
1 parent 862cbbb commit c352c37
Show file tree
Hide file tree
Showing 182 changed files with 17,539 additions and 4,951 deletions.
2 changes: 1 addition & 1 deletion docs/api/randomLineString.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Returns a random [linestring](linestring).
Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4).

### Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/api/shortestPath.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function Map0() {
[0, -3],
[0, -7],
],
]).geometry,
]),
};

var path = turf.shortestPath(start, end, options);
Expand Down
4 changes: 2 additions & 2 deletions docs/api/standardDeviationalEllipse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ in ArcGIS and the [QGIS Standard Deviational Ellipse Plugin](http://arken.nmbu.n

• Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for
Spatial Description,” _Geografiska Annaler_ 53, no. 1 (1971): 28–39,
doi:[10.2307/490885](https://doi.org/10.2307/490885).
doi:\{@link [https://doi.org/10.2307/490885 \| 10.2307/490885\}](https://doi.org/10.2307/490885 \| 10.2307/490885\}).

• Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”
_American Journal of Sociology_ 33, no. 1 (1927): 94—98,
doi:[10.1086/214336](https://doi.org/10.1086/214336).
doi:\{@link [https://doi.org/10.1086/214336 \| 10.1086/214336\}](https://doi.org/10.1086/214336 \| 10.1086/214336\}).

### Parameters

Expand Down
10 changes: 5 additions & 5 deletions docs/api/union.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Takes input [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.

### Parameters

| Name | Type | Description |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| features | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | input Polygon features |
| options<i>?</i> | **Object** | Optional Parameters _(default \{\})_ |
| options.properties<i>?</i> | **Object** | Translate Properties to output Feature _(default \{\})_ |
| Name | Type | Description |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| polygon1 | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | input Polygon features |
| options<i>?</i> | **Object** | Optional Parameters _(default \{\})_ |
| options.properties<i>?</i> | **Object** | Translate Properties to output Feature _(default \{\})_ |

### Returns

Expand Down
9,779 changes: 4,854 additions & 4,925 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.1.0",
"@docusaurus/preset-classic": "3.1.0",
"@mdx-js/react": "^3.0.0",
"@shoelace-style/shoelace": "^2.15.0",
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@mdx-js/react": "^3.0.1",
"@shoelace-style/shoelace": "^2.16.0",
"@turf/turf": "^6.5.0",
"clsx": "^2.0.0",
"clsx": "^2.1.1",
"leaflet": "^1.9.4",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"turf-6": "npm:@turf/turf@^6.5.0",
"turf-7": "npm:@turf/turf@^7.0.0",
"turf-next": "npm:@turf/turf@^7.0.0"
"turf-7": "npm:@turf/turf@^7.1.0",
"turf-next": "npm:@turf/turf@^7.1.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.0",
"@docusaurus/types": "3.1.0",
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/types": "^3.5.2",
"documentation": "^14.0.3",
"glob": "^10.3.10",
"glob": "^10.4.5",
"load-json-file": "^7.0.1",
"prettier": "^3.2.5",
"prettier": "^3.3.3",
"yamljs": "^0.3.0"
},
"repository": {
Expand Down Expand Up @@ -68,7 +68,8 @@
"Stefano Borghi <@stebogit>",
"Lyzi Diamond <@lyzidiamond>",
"Jordan Rousseau <@jvrousseau>",
"Bill Morris <@wboykinm>"
"Bill Morris <@wboykinm>",
"James Beard <[email protected]>"
],
"license": "MIT",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-6.5.0/api/randomLineString.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Returns a random [linestring](linestring).
Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4).

### Parameters

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-7.0.0/api/randomLineString.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Returns a random [linestring](linestring).
Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4).

### Parameters

Expand Down
79 changes: 79 additions & 0 deletions versioned_docs/version-7.1.0/api/along.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: along
---

import * as turf from "turf-next";
import ExampleMap from "@site/src/components/ExampleMap";
import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Takes a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) at a specified distance along the line.

### Parameters

| Name | Type | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| line | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | input line |
| distance | **number** | distance along the line |
| options<i>?</i> | **Object** | Optional parameters |
| options.units<i>?</i> | **string** | can be degrees, radians, miles, or kilometers _(default "kilometers")_ |

### Returns

<ul>
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Point `distance` `units` along the line

</ul>

### Examples

```javascript
var line = turf.lineString([
[-83, 30],
[-84, 36],
[-78, 41],
]);
var options = { units: "miles" };

var along = turf.along(line, 200, options);
```

export function Map0() {
"use strict";

// jsdoc example start
var line = turf.lineString([
[-83, 30],
[-84, 36],
[-78, 41],
]);
var options = { units: "miles" };

var along = turf.along(line, 200, options);

//addToMap
var addToMap = { along, line };
// jsdoc example end

return <ExampleMap addToMap={addToMap} />;
}

<!-- prettier-ignore -->
<BrowserOnly>{() => <Map0 />}</BrowserOnly>

### Installation

```javascript
$ npm install @turf/along

import { along } from "@turf/along";
const result = along(...);
```

```javascript
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.along(...);
```
53 changes: 53 additions & 0 deletions versioned_docs/version-7.1.0/api/angle.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: angle
---

import * as turf from "turf-next";
import ExampleMap from "@site/src/components/ExampleMap";
import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Finds the angle formed by two adjacent segments defined by 3 points. The result will be the (positive clockwise)
angle with origin on the `startPoint-midPoint` segment, or its explementary angle if required.

### Parameters

| Name | Type | Description |
| ---------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| startPoint | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | Start Point Coordinates |
| midPoint | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | Mid Point Coordinates |
| endPoint | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | End Point Coordinates |
| options<i>?</i> | **Object** | Optional parameters _(default \{\})_ |
| options.explementary<i>?</i> | **boolean** | Returns the explementary angle instead (360 - angle) _(default false)_ |
| options.mercator<i>?</i> | **boolean** | if calculations should be performed over Mercator or WGS84 projection _(default false)_ |

### Returns

<ul>
**number** Angle between the provided points, or its explementary.

</ul>

### Examples

```javascript
turf.angle([5, 5], [5, 6], [3, 4]);
//=45
```

### Installation

```javascript
$ npm install @turf/angle

import { angle } from "@turf/angle";
const result = angle(...);
```

```javascript
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.angle(...);
```
83 changes: 83 additions & 0 deletions versioned_docs/version-7.1.0/api/area.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: area
---

import * as turf from "turf-next";
import ExampleMap from "@site/src/components/ExampleMap";
import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Calculates the geodesic area in square meters of one or more polygons.

### Parameters

| Name | Type | Description |
| ------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input polygon(s) as \{@link Geometry\}, \{@link Feature\}, or \{@link FeatureCollection\} |

### Returns

<ul>
**number** area in square meters

</ul>

### Examples

```javascript
var polygon = turf.polygon([
[
[125, -15],
[113, -22],
[154, -27],
[144, -15],
[125, -15],
],
]);

var area = turf.area(polygon);
```

export function Map0() {
"use strict";

// jsdoc example start
var polygon = turf.polygon([
[
[125, -15],
[113, -22],
[154, -27],
[144, -15],
[125, -15],
],
]);

var area = turf.area(polygon);

//addToMap
var addToMap = { polygon };
polygon.properties.area = area;
// jsdoc example end

return <ExampleMap addToMap={addToMap} />;
}

<!-- prettier-ignore -->
<BrowserOnly>{() => <Map0 />}</BrowserOnly>

### Installation

```javascript
$ npm install @turf/area

import { area } from "@turf/area";
const result = area(...);
```

```javascript
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.area(...);
```
41 changes: 41 additions & 0 deletions versioned_docs/version-7.1.0/api/azimuthToBearing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: azimuthToBearing
---

import * as turf from "turf-next";
import ExampleMap from "@site/src/components/ExampleMap";
import BrowserOnly from "@docusaurus/BrowserOnly";

### Description

Converts any azimuth angle from the north line direction (positive clockwise)
and returns an angle between -180 and +180 degrees (positive clockwise), 0 being the north line

### Parameters

| Name | Type | Description |
| ----- | ---------- | ------------------------- |
| angle | **number** | between 0 and 360 degrees |

### Returns

<ul>
**number** bearing between -180 and +180 degrees

</ul>

### Installation

```javascript
$ npm install @turf/helpers

import { azimuthToBearing } from "@turf/helpers";
const result = azimuthToBearing(...);
```

```javascript
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.azimuthToBearing(...);
```
Loading

0 comments on commit c352c37

Please sign in to comment.