Skip to content

Commit

Permalink
7.0.0 docs (#199)
Browse files Browse the repository at this point in the history
* Upgrading documentation.js to v14. Adding multiple versions of @turf/turf so our live examples in each documentation version can use the appropriate version of turf they were written for.

* Making output directory config a bit more flexible. No need to replace `code` with ```code```. Fixing a bug where bulleted lists and the following paragraph were getting munged together.

* Updating git submodule to commit tagged as v7.0.0.

* API Docs based on v7.0.0 release. Mostly includes change to actual documentation content, though also some escaping changes, and referring to more specific Turf version so code driving embedded maps continues to work across documentation versions. Some links in descriptions now break, though this seems to be a change to the way documentation.js parses content. Might have to fix these by hand for now.

* Fixing a couple of broken links and known issues by hand.

* Snapshotting v7.0.0 documentation.

* Missed a couple of broken links.
  • Loading branch information
smallsaucepan authored Jun 18, 2024
1 parent 6ba6e63 commit 862cbbb
Show file tree
Hide file tree
Showing 511 changed files with 22,454 additions and 7,894 deletions.
3 changes: 2 additions & 1 deletion api-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export default [
"api/booleanParallel",
"api/booleanPointInPolygon",
"api/booleanPointOnLine",
"api/booleanTouches",
"api/booleanWithin",
],
},
Expand Down Expand Up @@ -251,7 +252,6 @@ export default [
items: [
"api/angle",
"api/booleanIntersects",
"api/booleanTouches",
"api/booleanValid",
"api/centerMean",
"api/centerMedian",
Expand All @@ -274,6 +274,7 @@ export default [
"api/polygons",
"api/pt",
"api/quadratAnalysis",
"api/rbush",
"api/standardDeviationalEllipse",
"api/variance",
],
Expand Down
16 changes: 8 additions & 8 deletions docs/api/along.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: along
---

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

Expand All @@ -12,17 +12,17 @@ Takes a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and retu

### 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")_ |
| 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
**[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>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/angle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: angle
---

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

Expand All @@ -18,7 +18,7 @@ angle with origin on the `startPoint-midPoint` segment, or its explementary angl
| 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<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)_ |

Expand Down
2 changes: 1 addition & 1 deletion docs/api/area.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: area
---

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

Expand Down
13 changes: 8 additions & 5 deletions docs/api/bbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
title: bbox
---

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

### Description

Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
Calculates the bounding box for any GeoJSON object, including FeatureCollection.
Uses geojson.bbox if available and options.recompute is not set.

### Parameters

| Name | Type | Description |
| ------- | ------------------------------------------------------------ | ------------------ |
| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON object |
| Name | Type | Description |
| ------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ |
| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON object |
| options<i>?</i> | **Object** | Optional parameters _(default \{\})_ |
| options.recompute<i>?</i> | **boolean** | Whether to ignore an existing bbox property on geojson |

### Returns

Expand Down
12 changes: 6 additions & 6 deletions docs/api/bboxClip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bboxClip
---

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

Expand All @@ -14,15 +14,15 @@ May result in degenerate edges when clipping Polygons.

### Parameters

| Name | Type | Description |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| feature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)>** | feature to clip to the bbox |
| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order |
| Name | Type | Description |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| feature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | feature to clip to the bbox |
| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order |

### Returns

<ul>
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)>** clipped Feature
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** clipped Feature

</ul>

Expand Down
16 changes: 8 additions & 8 deletions docs/api/bboxPolygon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bboxPolygon
---

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

Expand All @@ -12,17 +12,17 @@ Takes a bbox and returns an equivalent [polygon](https://tools.ietf.org/html/rfc

### Parameters

| Name | Type | Description |
| -------------------------- | --------------------------------------------------------- | ----------------------------------------------- |
| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order |
| options<i>?</i> | **Object** | Optional parameters _(default \{})_ |
| options.properties<i>?</i> | **Properties** | Translate properties to Polygon _(default \{})_ |
| options.id<i>?</i> | **string \| number** | Translate Id to Polygon _(default \{})_ |
| Name | Type | Description |
| -------------------------- | --------------------------------------------------------- | ------------------------------------------------ |
| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order |
| options<i>?</i> | **Object** | Optional parameters _(default \{\})_ |
| options.properties<i>?</i> | **Properties** | Translate properties to Polygon _(default \{\})_ |
| options.id<i>?</i> | **string \| number** | Translate Id to Polygon _(default \{\})_ |

### Returns

<ul>
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)>** a Polygon representation of the bounding box
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a Polygon representation of the bounding box

</ul>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/bearing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bearing
---

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

Expand All @@ -17,7 +17,7 @@ i.e. the angle measured in degrees from the north line (0 degrees)
| --------------------- | -------------------------------------------------------------- | ------------------------------------------------------ |
| start | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | starting Point |
| end | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | ending Point |
| options<i>?</i> | **Object** | Optional parameters _(default \{})_ |
| options<i>?</i> | **Object** | Optional parameters _(default \{\})_ |
| options.final<i>?</i> | **boolean** | calculates the final bearing if true _(default false)_ |

### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/api/bearingToAzimuth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bearingToAzimuth
---

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

Expand Down
18 changes: 9 additions & 9 deletions docs/api/bezierSpline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: bezierSpline
---

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

Expand All @@ -16,18 +16,18 @@ The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc

### 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 LineString |
| options<i>?</i> | **Object** | Optional parameters _(default \{})_ |
| options.properties<i>?</i> | **Object** | Translate properties to output _(default \{})_ |
| options.resolution<i>?</i> | **number** | time in milliseconds between points _(default 10000)_ |
| options.sharpness<i>?</i> | **number** | a measure of how curvy the path should be between splines _(default 0.85)_ |
| 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 LineString |
| options<i>?</i> | **Object** | Optional parameters _(default \{\})_ |
| options.properties<i>?</i> | **Object** | Translate properties to output _(default \{\})_ |
| options.resolution<i>?</i> | **number** | time in milliseconds between points _(default 10000)_ |
| options.sharpness<i>?</i> | **number** | a measure of how curvy the path should be between splines _(default 0.85)_ |

### Returns

<ul>
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)>** curved line
**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** curved line

</ul>

Expand Down
Loading

0 comments on commit 862cbbb

Please sign in to comment.