From 128ad3cbd2aa02f4f759a4ddef0851c9e0b9c275 Mon Sep 17 00:00:00 2001 From: James Beard Date: Tue, 1 Oct 2024 10:59:30 +1000 Subject: [PATCH 1/8] Doc generation improvements WIP. --- .prettierrc.json | 1 + CONTRIBUTING.md | 87 +++++++++++---- package.json | 3 +- scripts/generate-api-mdx.ts | 212 ++++++++++++++++++++++++------------ 4 files changed, 214 insertions(+), 89 deletions(-) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f67bb99..b5b4b540 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,36 +1,81 @@ +## Overview of how the docs work + +1. A custom script (generate-api-mdx.ts) uses documentation.js to generate MDX describing the API directly the Turf source files. generate-api-mdx.ts does any custom handling Turf requires, for example generating the interactive maps used to display examples. + +1. Docusaurus then processes that MDX into a HTML website. + +1. The HTML files are uploaded to github pages where they become publicly accessible via https://turfjs.org + ## Updating existing documentation for a module -- This happens in the [Turf repository](https://github.com/turfjs/turf/) with `/packages/` directory for each module. -- To fix the documentation for a module you need to modify the [jsdoc](https://jsdoc.app/) for an individual module found in either the `index.js` or the `index.ts`. - - eg to update the documentation for `@turf/along` you'd need to modify the jsdoc within `/turf/packages/turf-along/index.ts`. + +Assume we are updating the documentation to v7.1.0. + +1. In your local turf-www repo, update the `turf` submodule link in this repository to point to the commit associated with 7.1.0 on master (948cdafaf7) + ``` + $ git -C turf/ checkout 948cdafaf7 + $ git add turf + $ git commit -m "Updating turf submodule to v7.1.0" + ``` +1. Snapshot current version of documentation (a.k.a v7.0.0) Generate new MDX files + +- This happens in the [Turf repository](https://github.com/turfjs/turf/) with `/packages/` directory for each module. + +- To fix the documentation for a module you need to modify the [jsdoc](https://jsdoc.app/) for an individual module found in either the `index.js` or the `index.ts`. + +- eg to update the documentation for `@turf/along` you'd need to modify the jsdoc within `/turf/packages/turf-along/index.ts`. + - Once you've made your changes you'll need to create a pull request to the [Turf repository](https://github.com/turfjs/turf/). - - **Note** Nothing needs to be changed in the `README.md` for a module. + +- **Note** Nothing needs to be changed in the `README.md` for a module. + - Even once your PR is accepted the docs will still need to be updated manually. ## Updating content on http://turfjs.org/ + 1. Clone with `turf-www` repository locally - - `git clone https://github.com/Turfjs/turf-www.git --recursive` - - _Important: The `--recursive` flag is important._ + +- `git clone https://github.com/Turfjs/turf-www.git --recursive` + +- _Important: The `--recursive` flag is important._ + 2. Run `npm install` + 3. Start with updating the turf project dependency: - - `cd` into the `turf-www/turf` submodule and run `git pull origin master` - - Run `lerna run build`, this will update the `dist/js/index.js` for each module, from which the docs are generated. -4. `cd` back to the root of the `turf-www` project -5. Run `npm run create-config` -6. Run `npm run generate` -7. Commit and push the changes -## Updating pages templates -If you would like to have a go at updating the actual website then you'll need to make changes in the `turf-www/src` folder. The pages are built using [Vue.js](https://vuejs.org/) and [Nuxt.js](https://nuxtjs.org/). +- `cd` into the `turf-www/turf` submodule and run `git pull origin master` -To get a server running with live-reload etc so you can work on the docs run `npm run start`. +- Run `lerna run build`, this will update the `dist/js/index.js` for each module, from which the docs are generated. + +4. `cd` back to the root of the `turf-www` project + +5. Run `npm run create-config` + +6. Run `npm run generate` + +7. Commit and push the changes + +- This project contains a reference to the turfjs/turf repo as a git submodule. + +- Updating the API docs is a two step process: + +- 1. Update the + +- 1. Run the scripts/generate-api-mdx.ts script to parse the turf packages linked as a submodule -## Overview for how the docs work - http://turfjs.org/ is managed as a static site using Github Pages - - A custom domain for Github Pages in present in `/docs/CNAME` + +- A custom domain for Github Pages in present in `/docs/CNAME` + - The `/src` directory contains the VueJS app - - This can be run in a live preview mode using `npm run start`, note that this won't pick up changes to the module documentation. + +- This can be run in a live preview mode using `npm run start`, note that this won't pick up changes to the module documentation. + - The API docs are generated from jsdoc markup in each module within the `/turf` submodule - - [DocumentationJS](https://documentation.js.org/) is used to parse the jsdoc content in each module - - The `npm run create-config` cmd calls the `/scripts/create-config.js` file, which generates the `src/assets/config.json` file which is used by the VueJS to render the docs. + +- [DocumentationJS](https://documentation.js.org/) is used to parse the jsdoc content in each module + +- The `npm run create-config` cmd calls the `/scripts/create-config.js` file, which generates the `src/assets/config.json` file which is used by the VueJS to render the docs. + - The `/src` VueJS app, is built into the final deployed docs are built using [NuxtJS](https://nuxtjs.org/) and are found in the `/docs` folder - - These are created using the `npm run generate` cmd. + +- These are created using the `npm run generate` cmd. diff --git a/package.json b/package.json index 1f5e3e3c..ea77226b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "clear": "docusaurus clear", "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", - "write-heading-ids": "docusaurus write-heading-ids" + "write-heading-ids": "docusaurus write-heading-ids", + "generate-api-mdx": "npx tsx ./scripts/generate-api-mdx.ts" }, "dependencies": { "@docusaurus/core": "3.1.0", diff --git a/scripts/generate-api-mdx.ts b/scripts/generate-api-mdx.ts index 11cd2b2a..1bfb1251 100644 --- a/scripts/generate-api-mdx.ts +++ b/scripts/generate-api-mdx.ts @@ -26,9 +26,12 @@ import * as prettier from "prettier"; const sidebarBuckets = {}; const orderedSidebarBucketKeys: string[] = []; - const functionCategories = {}; + const tocCategories = {}; let category = ""; + // Assemble user defined categories to place functions into. These will be the + // categories in the API sidebar. A few other categories we create + // automatically below to place types and constants in to. const docs = yaml.load(path.join(srcPathDir, "documentation.yml")); docs.toc.forEach((tocItem) => { if (tocItem.name) { @@ -36,76 +39,104 @@ import * as prettier from "prettier"; orderedSidebarBucketKeys.push(tocItem.name); category = tocItem.name; } else { - functionCategories[tocItem] = category; + tocCategories[tocItem] = category; } }); + // Catch all for uncategorised functions. sidebarBuckets["Other"] = []; orderedSidebarBucketKeys.push("Other"); + console.log(sidebarBuckets); + // glob index.ts/js in turf/packages/ - const packageDirs = globSync(path.join(srcPathDir, "packages", "turf-*")) - // These two packages weren't exported from @turf/turf in 6.5.0, so - // aren't in the CDN file the website uses. Suppress for now - // and add back in once v7 is on the CDN. - .filter((path) => !path.includes("turf-rectangle-grid")) - .filter((path) => !path.includes("turf-nearest-neighbor-analysis")); - - await Promise.all( - packageDirs.map(async (packageDir) => { - const moduleName = path.parse(packageDir).name; - console.log(moduleName); - - const pckg = loadJsonFileSync(path.join(packageDir, "package.json")); - - // Check for index.ts or index.js - const indexFiles = globSync(path.join(packageDir, "index.[jt]s")); - if (indexFiles.length === 1) { - const indexFile = indexFiles[0]; - const res = await documentation.build([path.resolve(indexFile)], { - external: [], - shallow: true, - }); - const moduleObj = JSON.parse(await documentation.formats.json(res)); - - // Multiple functions e.g. helpers or meta - await Promise.all( - moduleObj.map(async (fn) => { - if (fn.kind && fn.kind === "module") { - console.log("skipping module header"); - return; - } - if (fn.kind && fn.kind !== "function") { - console.log(`skipping non-function ${fn.name} ${fn.kind}`); - return; - } - - const [filename, mdx] = functionJsonToMdx(fn, pckg); - - if (filename && mdx) { - const prettyMdx = await prettier.format(mdx, { - parser: "mdx", - trailingSemi: "none", - }); - fs.writeFileSync( - docsOutDir + "/api/" + filename + ".mdx", - prettyMdx, - ); - if (functionCategories[filename]) { - sidebarBuckets[functionCategories[filename]].push( - `api/${filename}`, - ); - } else { - // No category provided in documentation.yml. Default to "Other". - sidebarBuckets["Other"].push(`api/${filename}`); - } - } else { - console.log(`skipping ${moduleName} ${filename}`); - } - }), - ); + const packageDirs = globSync(path.join(srcPathDir, "packages", "turf-*")); + // These two packages weren't exported from @turf/turf in 6.5.0, so + // aren't in the CDN file the website uses. Suppress for now + // and add back in once v7 is on the CDN. + // .filter((path) => path.includes("turf-helpers")); + // .filter((path) => path.includes("turf-bearing")) + // .filter((path) => !path.includes("turf-rectangle-grid")) + // .filter((path) => !path.includes("turf-nearest-neighbor-analysis")); + + for (const packageDir of packageDirs) { + const moduleName = path.parse(packageDir).name; + console.log(`\n\n*** ${moduleName}\n`); + + const pckg = loadJsonFileSync(path.join(packageDir, "package.json")); + + // Check for index.ts or index.js + const indexFiles = globSync(path.join(packageDir, "index.[jt]s")); + if (indexFiles.length === 1) { + const indexFile = indexFiles[0]; + + // Get the documentation for the module. + const res = await documentation.build([path.resolve(indexFile)], { + external: [], + shallow: true, + }); + const moduleObj = JSON.parse(await documentation.formats.json(res)); + + if (moduleName === "turf-moran-index") { + console.log(JSON.stringify(moduleObj)); } - }), - ); + + // For each exported member of the module (functions, types, consts) + // generate the documentation, save to a file, and add an entry to the + // appropriate heading in the sidebar. Some modules have multiple + // members e.g. helpers or meta + for (const member of moduleObj) { + // console.log("function", JSON.stringify(fn)); + + if (member.kind === "module") { + console.log("skipping module header"); + continue; + } + + let filename: string | undefined = undefined, + mdx: string | undefined = undefined; + + if (member.kind === "typedef") { + [filename, mdx] = typedefJsonToMdx(member, pckg); + } else if (member.kind === "constant") { + [filename, mdx] = [member.name, "bar"]; + } else if (member.kind === "function") { + console.log( + `skipping2 ${member.kind} ${member.name} from ${moduleName}`, + ); + } else { + // A function. + [filename, mdx] = functionJsonToMdx(member, pckg); + } + + console.log(pckg.name, member.name, filename); + + if (filename && mdx) { + const prettyMdx = await prettier.format(mdx, { + parser: "mdx", + trailingSemi: "none", + }); + const apiDir = member.kind === "typedef" ? "api/types" : "api"; + fs.writeFileSync( + path.join(docsOutDir, apiDir, `${filename}.mdx`), + prettyMdx, + ); + + if (tocCategories[filename]) { + sidebarBuckets[tocCategories[filename]].push( + `${apiDir}/${filename}`, + ); + } else { + // No category provided in documentation.yml. Default to "Other". + sidebarBuckets["Other"].push(path.join(apiDir, `${filename}`)); + } + } else { + console.log( + `skipping ${member.kind} ${member.name} from ${moduleName}`, + ); + } + } + } + } const sidebarConfig: SidebarConfig[] = []; for (const key of orderedSidebarBucketKeys) { @@ -117,6 +148,8 @@ import * as prettier from "prettier"; }); } + console.log(sidebarConfig); + // Save API categories config to api-sidebar.ts. Prettify content as well. const sidebarContent = `// Generated automatically by generate-api-mdx.ts // Do not edit manually. @@ -139,6 +172,28 @@ export default ${JSON.stringify(sidebarConfig)}`; }, ); + function typedefJsonToMdx(typedef, pckg) { + return [typedef.name, "some mdx"]; + if (moduleObj.length === 1) { + // Single function in this module. + return functionJsonToMdx(moduleObj[0], pckg); + } else { + let mdx = ""; + let filename = ""; + // Multiple functions e.g. helpers or meta + moduleObj.forEach((fn) => { + if (fn.kind && fn.kind === "module") { + console.log("skipping module header"); + return; + } + const [fnFilename, fnMdx] = functionJsonToMdx(fn, pckg); + filename = fnFilename; + mdx.concat(fnMdx); + }); + return [filename, mdx]; + } + } + function moduleJsonToMdx(moduleObj, pckg) { if (moduleObj.length === 1) { // Single function in this module. @@ -226,8 +281,30 @@ const result = turf.${name}(...); function getParamsMdx(fn) { let mdx = "| Name | Type | Description |\n| --- | --- | --- |\n"; - for (const tag of fn.tags.filter((tag) => tag.title === "param")) { - mdx = mdx.concat(renderTagToMdx(tag)); + const tags = fn.tags; + for (const param of fn.params) { + const paramTag = tags + .filter((tag) => tag.name === param.name) + .slice(0, 1)[0]; + if (paramTag) { + param.type = paramTag.type; + } + mdx = mdx.concat(renderTagToMdx(param)); + // For example, options.blah + if (param.properties) { + for (const property of param.properties) { + // Merge in the 'types' field from the tag of the same name. For some + // reason documentationjs stores the type data (including optional) on + // the tag, but the rich description (including embedded links) on the + // params. + const propertyTag = tags + .filter((tag) => tag.name === property.name) + .slice(0, 1)[0]; + + property.type = propertyTag.type; + mdx = mdx.concat(renderTagToMdx(property)); + } + } } return mdx; @@ -370,7 +447,7 @@ export function Map${index}() { } // Join multi-line param descriptions with a space. https://stackoverflow.com/a/30955762 const description = tag.description - ? newlineToSpace(mdxEscape(tag.description)) + ? newlineToSpace(mdxEscape(renderToMdx(tag.description))) : ""; const defaultValue = tag.default ? `_(default ${mdxEscape(tag.default)})_` @@ -463,6 +540,7 @@ export function Map${index}() { mdx = mdx.concat(node.value); break; case "link": + case "linkReference": let url = node.url; if (docs.paths[node.url]) { url = docs.paths[node.url]; From 9c08de959f397cfc745eb10019a99d95bc9090d6 Mon Sep 17 00:00:00 2001 From: James Beard Date: Wed, 2 Oct 2024 16:20:48 +1000 Subject: [PATCH 2/8] Revised website update process for Docusaurus site generation and github action publishing step. --- CONTRIBUTING.md | 109 ++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 45 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5b4b540..839c90ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,81 +1,100 @@ -## Overview of how the docs work +## Updating documentation for a module -1. A custom script (generate-api-mdx.ts) uses documentation.js to generate MDX describing the API directly the Turf source files. generate-api-mdx.ts does any custom handling Turf requires, for example generating the interactive maps used to display examples. +Documentation is generated automatically wherever possible directly from the Turf source code. Best practice is to submit a PR to update the documentation in the relevant package of the turf repository. -1. Docusaurus then processes that MDX into a HTML website. +For example, to update the documentation for `@turf/along` you would modify the JSDoc comments within [`/turf/packages/turf-along/index.ts`](https://github.com/Turfjs/turf/blob/master/packages/turf-along/index.ts). -1. The HTML files are uploaded to github pages where they become publicly accessible via https://turfjs.org - -## Updating existing documentation for a module +As part of the commit process, the README.md in the turf-along directory will automatically be updated to reflect your changes. -Assume we are updating the documentation to v7.1.0. +Periodically the Turf website is also updated to reflect the latest documentation generated from the source code. It is similar to the README.md though has some extra features such as interactive example maps. -1. In your local turf-www repo, update the `turf` submodule link in this repository to point to the commit associated with 7.1.0 on master (948cdafaf7) - ``` - $ git -C turf/ checkout 948cdafaf7 - $ git add turf - $ git commit -m "Updating turf submodule to v7.1.0" - ``` -1. Snapshot current version of documentation (a.k.a v7.0.0) Generate new MDX files +## Updating the Turf website -- This happens in the [Turf repository](https://github.com/turfjs/turf/) with `/packages/` directory for each module. +The content of the Turf website resides in a separate repository, which links to the turf repo as a submodule. -- To fix the documentation for a module you need to modify the [jsdoc](https://jsdoc.app/) for an individual module found in either the `index.js` or the `index.ts`. +1. A custom script (generate-api-mdx.ts) generates MDX (extended Markdown) describing the API directly from the Turf source files. generate-api-mdx.ts does any custom handling Turf requires, for example generating the interactive maps used to display examples. +1. Docusaurus then processes that MDX into a static HTML website. +1. The HTML files are uploaded to github pages where they become publicly accessible via https://turfjs.org -- eg to update the documentation for `@turf/along` you'd need to modify the jsdoc within `/turf/packages/turf-along/index.ts`. +### Terminology confusion -- Once you've made your changes you'll need to create a pull request to the [Turf repository](https://github.com/turfjs/turf/). +Docusaurus lets us publish multiple versions of the documentation simultaneously, accessed via a dropdown in the top menu. The terminology used can be a bit confusing though. -- **Note** Nothing needs to be changed in the `README.md` for a module. +Currently on the website we have versions: -- Even once your PR is accepted the docs will still need to be updated manually. +| Label | Docusaurus | Description | +| ----- | ------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| Next | Current | Bleeding edge _unversioned_ documentation from the git repo. Probably hasn't yet been published to NPM | +| 7.0.0 | Latest | The most recent versioned snapshot of the documentation. This is the default shown to users when first visiting the site | +| 6.5.0 | a previous version | Archived documentation from a version that is neither Current or Latest | -## Updating content on http://turfjs.org/ +When we upload a new release of Turf to NPM we take a snapshot of the _Current_ documentation and copy that into version _whatever_. Docusaurus then points "Latest" at this newly minted version. -1. Clone with `turf-www` repository locally +### Generate documentation to version as 7.1.0 -- `git clone https://github.com/Turfjs/turf-www.git --recursive` +In this step you will take a snapshot of the _Current_ documentation, and save it as version 7.1.0. -- _Important: The `--recursive` flag is important._ +First thing to do is make sure _Current_ points to the code (and hence, the documentation) for 7.1.0. It likely points to the HEAD of the tree, which may not necessarily be 7.1.0, especially if there have already been some bug fixes between releasing to NPM and updating the documentation. So we will temporarily point _Current_ to the 7.1.0 code, generate our 7.1.0 snapshot, and then restore it to what it was. -2. Run `npm install` +To do this we link the `turf/` submodule directory in turf-www to the relevant commit in the turf repo. In the example below commit `68915ee` refers to the 7.1.0 tag in the turf repo: -3. Start with updating the turf project dependency: +``` +$ git -C turf/ checkout 68915ee +``` -- `cd` into the `turf-www/turf` submodule and run `git pull origin master` +Now that the `turf/` submodule points to 7.1.0 code regenerate the API documentation: -- Run `lerna run build`, this will update the `dist/js/index.js` for each module, from which the docs are generated. +``` +$ npx tsx ./scripts/generate-api-mdx.ts +``` -4. `cd` back to the root of the `turf-www` project +You will likely see many changes to MDX files in the `docs/` directory. -5. Run `npm run create-config` +Run docusaurus to view the site in dev mode and highlight any missing routes, etc. Docusaurus is pretty good at finding problems. Fix any issues manually, usually by tweaking the MDX. -6. Run `npm run generate` +``` +$ npm run start +``` -7. Commit and push the changes +Note the generated documentation will appear under the _Next_ drop down menu. -- This project contains a reference to the turfjs/turf repo as a git submodule. +You could at this point commit the changes. However we're about to make a versioned snapshot which we _will_ commit, so it's not absolutely necessary. -- Updating the API docs is a two step process: +Now, version the contents of _Current_ as 7.1.0: -- 1. Update the +``` +$ npm run docusaurus docs:version 7.1.0 +``` -- 1. Run the scripts/generate-api-mdx.ts script to parse the turf packages linked as a submodule +You will now see many more changes in the `versioned_docs` directory. This is the snapshot we want to commit and publish. Before we do that though, switch back to the HEAD of our git repo and regenerate the _Current_ documentation based on that code: -- http://turfjs.org/ is managed as a static site using Github Pages +``` +$ git submodule update --init +$ npx tsx ./scripts/generate-api-mdx.ts +``` -- A custom domain for Github Pages in present in `/docs/CNAME` +Most, if not all, of the changes in docs/ should revert. If any remain review them as they may have previously been committed as manual corrections (and thus can be discarded). -- The `/src` directory contains the VueJS app +You'll likely have changes in these locations: -- This can be run in a live preview mode using `npm run start`, note that this won't pick up changes to the module documentation. +``` +api-sidebar.ts <- might change +versions.json <- should be a line added for the new version snapshot +docs/ <- maybe a couple of changed files +versioned_docs/ <- many new files +versioned_sidebars/ <- one new file +``` -- The API docs are generated from jsdoc markup in each module within the `/turf` submodule +Once everything looks good, commit all the files and push to your fork: -- [DocumentationJS](https://documentation.js.org/) is used to parse the jsdoc content in each module +``` +$ git add . +$ git commit -m "Adding v7.1.0 documentation snapshot." +$ git push +``` -- The `npm run create-config` cmd calls the `/scripts/create-config.js` file, which generates the `src/assets/config.json` file which is used by the VueJS to render the docs. +### Publishing to turfjs.org -- The `/src` VueJS app, is built into the final deployed docs are built using [NuxtJS](https://nuxtjs.org/) and are found in the `/docs` folder +To build and publish the site, you simply need to create a PR from your fork to turf-www:master. This will run a test build as a github action. -- These are created using the `npm run generate` cmd. +When your PR is merged into master, another github action will deploy the content automatically to github pages. From e4fedf904eb443faf6fbe91c27cfb782d95b2a38 Mon Sep 17 00:00:00 2001 From: James Beard Date: Sat, 5 Oct 2024 13:28:45 +1000 Subject: [PATCH 3/8] generate-api-mdx now generates typedefs for types (such as Units, and DbscanProps) based on JSDoc comments. Also uses new @turfcategory tag (getting committed in turf repo soon) to categorise members in the side menu, rather than documentation.yml from the turf repo. --- CONTRIBUTING.md | 3 +- scripts/generate-api-mdx.ts | 342 ++++++++++++++++++++++-------------- 2 files changed, 209 insertions(+), 136 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 839c90ac..d8bd0ba2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,7 +53,8 @@ You will likely see many changes to MDX files in the `docs/` directory. Run docusaurus to view the site in dev mode and highlight any missing routes, etc. Docusaurus is pretty good at finding problems. Fix any issues manually, usually by tweaking the MDX. ``` -$ npm run start +$ npm run build +$ npm run serve ``` Note the generated documentation will appear under the _Next_ drop down menu. diff --git a/scripts/generate-api-mdx.ts b/scripts/generate-api-mdx.ts index 1bfb1251..31dd63cf 100644 --- a/scripts/generate-api-mdx.ts +++ b/scripts/generate-api-mdx.ts @@ -10,13 +10,9 @@ import * as prettier from "prettier"; // in an IIFE as top level async not allowed. const documentation = await import("documentation"); - const srcPathDir = path.resolve(__dirname, "..", "turf"); + const srcPathDir = path.resolve("/Users/james/Code/turf/span"); const docsOutDir = path.resolve(__dirname, "..", "docs"); - console.log(srcPathDir); - // ... - const modules = []; - interface SidebarConfig { type: string; label: string; @@ -25,42 +21,47 @@ import * as prettier from "prettier"; } const sidebarBuckets = {}; - const orderedSidebarBucketKeys: string[] = []; - const tocCategories = {}; - let category = ""; - // Assemble user defined categories to place functions into. These will be the - // categories in the API sidebar. A few other categories we create - // automatically below to place types and constants in to. + // Load documentation configuration from turf repo. We only use the paths + // section of this file, choosing instead to put members in categories based + // on the @turfcategory tag embedded within the JSDoc. const docs = yaml.load(path.join(srcPathDir, "documentation.yml")); - docs.toc.forEach((tocItem) => { - if (tocItem.name) { - sidebarBuckets[tocItem.name] = []; - orderedSidebarBucketKeys.push(tocItem.name); - category = tocItem.name; - } else { - tocCategories[tocItem] = category; - } + + // We do add some MDN links for common Javascript types. We don't keep them in + // documentation.yml as the README.md files generated from the turf repo have + // this taken care of automatically. + docs.paths = Object.assign(docs.paths, { + object: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + Object: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object", + string: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String", + number: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number", + boolean: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + Array: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array", + undefined: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Undefined", + Error: + "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error", }); - // Catch all for uncategorised functions. - sidebarBuckets["Other"] = []; - orderedSidebarBucketKeys.push("Other"); - console.log(sidebarBuckets); + // First run though all the packages and build a list of all the contained + // public members - functions, typedefs, constants. We gather the full list + // before rendering anything so we can insert cross references to internal + // typedefs. For example, Units. // glob index.ts/js in turf/packages/ const packageDirs = globSync(path.join(srcPathDir, "packages", "turf-*")); - // These two packages weren't exported from @turf/turf in 6.5.0, so - // aren't in the CDN file the website uses. Suppress for now - // and add back in once v7 is on the CDN. - // .filter((path) => path.includes("turf-helpers")); - // .filter((path) => path.includes("turf-bearing")) - // .filter((path) => !path.includes("turf-rectangle-grid")) - // .filter((path) => !path.includes("turf-nearest-neighbor-analysis")); + // .filter((path) => path.includes("turf-nearest-point-to-line")); + + const members: any[] = []; for (const packageDir of packageDirs) { const moduleName = path.parse(packageDir).name; - console.log(`\n\n*** ${moduleName}\n`); const pckg = loadJsonFileSync(path.join(packageDir, "package.json")); @@ -76,80 +77,94 @@ import * as prettier from "prettier"; }); const moduleObj = JSON.parse(await documentation.formats.json(res)); - if (moduleName === "turf-moran-index") { - console.log(JSON.stringify(moduleObj)); - } - // For each exported member of the module (functions, types, consts) // generate the documentation, save to a file, and add an entry to the // appropriate heading in the sidebar. Some modules have multiple // members e.g. helpers or meta for (const member of moduleObj) { - // console.log("function", JSON.stringify(fn)); - if (member.kind === "module") { console.log("skipping module header"); continue; } - let filename: string | undefined = undefined, - mdx: string | undefined = undefined; + // Augment the member object with the pckg details. We need those to + // display npm installation instructions. + members.push({ ...member, pckg }); + } + } + } - if (member.kind === "typedef") { - [filename, mdx] = typedefJsonToMdx(member, pckg); - } else if (member.kind === "constant") { - [filename, mdx] = [member.name, "bar"]; - } else if (member.kind === "function") { - console.log( - `skipping2 ${member.kind} ${member.name} from ${moduleName}`, - ); - } else { - // A function. - [filename, mdx] = functionJsonToMdx(member, pckg); - } + const typedefMembers = members.filter((member) => member?.kind === "typedef"); - console.log(pckg.name, member.name, filename); - - if (filename && mdx) { - const prettyMdx = await prettier.format(mdx, { - parser: "mdx", - trailingSemi: "none", - }); - const apiDir = member.kind === "typedef" ? "api/types" : "api"; - fs.writeFileSync( - path.join(docsOutDir, apiDir, `${filename}.mdx`), - prettyMdx, - ); + // Add a link entry to docs.paths for each typedef. Make the path the file + // (rather than the URL) and Docusaurus will handle relative links for us. + typedefMembers.forEach((member) => { + docs.paths[member.name] = `docs/api/types/${member.name}.mdx`; + }); - if (tocCategories[filename]) { - sidebarBuckets[tocCategories[filename]].push( - `${apiDir}/${filename}`, - ); - } else { - // No category provided in documentation.yml. Default to "Other". - sidebarBuckets["Other"].push(path.join(apiDir, `${filename}`)); - } - } else { - console.log( - `skipping ${member.kind} ${member.name} from ${moduleName}`, - ); - } + const functionMembers = members.filter( + (member) => member?.kind === "function", + ); + + await Promise.all( + functionMembers.map(async (member) => { + let filename: string | undefined = undefined, + category: string | undefined = undefined, + mdx: string | undefined = undefined; + + [filename, category, mdx] = functionJsonToMdx(member); + + if (filename && category && mdx) { + const prettyMdx = await prettier.format(mdx, { + parser: "mdx", + trailingSemi: "none", + }); + const fileurl = path.join("api", `${filename}`); + const filepath = `${fileurl}.mdx`; + + fs.writeFileSync(path.join(docsOutDir, filepath), prettyMdx); + addToSidebar(category, fileurl); + } else { + console.log(`skipping ${member.kind} ${member.name}`); } - } - } + }), + ); + + await Promise.all( + typedefMembers.map(async (member) => { + let filename: string | undefined = undefined, + category: string | undefined = undefined, + mdx: string | undefined = undefined; + + [filename, category, mdx] = typedefJsonToMdx(member); + if (filename && category && mdx) { + const prettyMdx = await prettier.format(mdx, { + parser: "mdx", + trailingSemi: "none", + }); + const fileurl = path.join("api", "types", `${filename}`); + const filepath = `${fileurl}.mdx`; + + fs.writeFileSync(path.join(docsOutDir, filepath), prettyMdx); + addToSidebar(category, fileurl); + } else { + console.log(`skipping ${member.kind} ${member.name}`); + } + }), + ); + + const sidebarBucketKeys = Object.keys(sidebarBuckets).sort(); const sidebarConfig: SidebarConfig[] = []; - for (const key of orderedSidebarBucketKeys) { + for (const key of sidebarBucketKeys) { sidebarConfig.push({ type: "category", label: key, - collapsed: false, + collapsed: true, items: sidebarBuckets[key].sort(), }); } - console.log(sidebarConfig); - // Save API categories config to api-sidebar.ts. Prettify content as well. const sidebarContent = `// Generated automatically by generate-api-mdx.ts // Do not edit manually. @@ -172,50 +187,92 @@ export default ${JSON.stringify(sidebarConfig)}`; }, ); - function typedefJsonToMdx(typedef, pckg) { - return [typedef.name, "some mdx"]; - if (moduleObj.length === 1) { - // Single function in this module. - return functionJsonToMdx(moduleObj[0], pckg); - } else { - let mdx = ""; - let filename = ""; - // Multiple functions e.g. helpers or meta - moduleObj.forEach((fn) => { - if (fn.kind && fn.kind === "module") { - console.log("skipping module header"); - return; - } - const [fnFilename, fnMdx] = functionJsonToMdx(fn, pckg); - filename = fnFilename; - mdx.concat(fnMdx); - }); - return [filename, mdx]; + function addToSidebar(category, filepath) { + // If there is no bucket for this category yet, add one. + if (!sidebarBuckets[category]) { + sidebarBuckets[category] = []; } + sidebarBuckets[category].push(filepath); } - function moduleJsonToMdx(moduleObj, pckg) { - if (moduleObj.length === 1) { - // Single function in this module. - return functionJsonToMdx(moduleObj[0], pckg); - } else { - let mdx = ""; - let filename = ""; - // Multiple functions e.g. helpers or meta - moduleObj.forEach((fn) => { - if (fn.kind && fn.kind === "module") { - console.log("skipping module header"); - return; + function typedefJsonToMdx(typedef) { + let mdx = ""; + + const name = typedef.name; + const filename = name; + + const description = getDescriptionMdx(typedef); + + const definition = renderTypedefToMdx(typedef); + + return [ + filename, + "Type Definitions", + `--- +title: ${name} +--- + +### Description + +${description} + +### Definition + +${definition} + +`, + ]; + } + + function renderTypedefToMdx(typedef) { + let mdx = ""; + if (typedef.type.name === "Function") { + // function - typedef.type.name === "Function" e.g. coordEachCallback + + mdx = mdx.concat("function (\n\n"); + mdx = mdx.concat(getParamsMdx(typedef)); + mdx = mdx.concat("\n)\n"); + + const returnsMdx = getReturnsMdx(typedef); + if (returnsMdx !== "") { + mdx = mdx.concat("### Returns\n").concat(returnsMdx).concat("\n"); + } + + return mdx; + } else if ( + typedef.type.name === "object" || + typedef.type.name === "Object" + ) { + // object - typedef.type.name === "object" e.g. DbscanProps + typedef.augments.forEach((augmentation) => { + if (augmentation.title === "extends") { + mdx = mdx.concat(renderToMdx(augmentation.name)).concat(" & "); } - const [fnFilename, fnMdx] = functionJsonToMdx(fn, pckg); - filename = fnFilename; - mdx.concat(fnMdx); }); - return [filename, mdx]; + + mdx = mdx.concat("object \\{\n\n"); + mdx = mdx.concat(getParamsMdx(typedef)); + mdx = mdx.concat("\n\\}\n"); + + return mdx; + } else { + // Union, etc - e.g. Units or AreaUnits + return renderToMdx(typedef.type); } } - function functionJsonToMdx(fn, pckg) { + function getTagByTitle(member, title): object | undefined { + const tags = member.tags; + let value: string | undefined = undefined; + tags.forEach((tag) => { + if (tag.title === title) { + value = tag; + } + }); + return value; + } + + function functionJsonToMdx(fn) { const name = fn.name; const description = getDescriptionMdx(fn); @@ -224,13 +281,19 @@ export default ${JSON.stringify(sidebarConfig)}`; const returns = getReturnsMdx(fn); + const categoryTag = getTagByTitle(fn, "turfcategory"); + const category = categoryTag?.description ?? "Other"; + let examples; if (hasExamples(fn)) { examples = getExamplesMdx(fn); } + fn.tags?.[""]; + return [ name, + category, `--- title: ${name} --- @@ -258,9 +321,9 @@ ${examples ? examples : ""} ### Installation \`\`\`javascript -$ npm install ${pckg.name} +$ npm install ${fn.pckg.name} -import { ${name} } from "${pckg.name}"; +import { ${name} } from "${fn.pckg.name}"; const result = ${name}(...); \`\`\` @@ -282,7 +345,13 @@ const result = turf.${name}(...); function getParamsMdx(fn) { let mdx = "| Name | Type | Description |\n| --- | --- | --- |\n"; const tags = fn.tags; - for (const param of fn.params) { + let params: typeof fn.params = []; + if (fn.params && fn.params.length > 0) { + params = fn.params; + } else { + params = fn.properties; + } + for (const param of params) { const paramTag = tags .filter((tag) => tag.name === param.name) .slice(0, 1)[0]; @@ -317,14 +386,8 @@ const result = turf.${name}(...); const returnsDescription = ret.description ? `${renderToMdx(ret.description)}` : ""; - mdx = mdx - .concat("
    \n") - .concat(mdxEscape(` ${returnsType} ${returnsDescription}\n`)) - .concat("
\n"); + mdx = mdx.concat(mdxEscape(` ${returnsType} ${returnsDescription}\n`)); } - // for (const tag of fn.tags.filter((tag) => tag.title === "returns")) { - // mdx = mdx.concat(renderTagToMdx(tag)); - // } return mdx; } @@ -431,6 +494,7 @@ export function Map${index}() { case "name": break; case "param": + case "property": const name = tag.name; let optional = ""; let type = ""; @@ -483,10 +547,10 @@ export function Map${index}() { return `\`\`\`javascript\n${mdxIn}\n\`\`\`\n`; } - function getDescriptionMdx(fn) { + function getDescriptionMdx(member) { let description = ""; - if (fn.description.children) { - for (const child of fn.description.children) { + if (member.description.children) { + for (const child of member.description.children) { description = description.concat(renderToMdx(child)); } } @@ -526,6 +590,7 @@ export function Map${index}() { for (const child of node.children) { mdx = mdx.concat(renderToMdx(child)); } + // Special handling if paragraph is embedded in a list item. if (parent && parent.type === "listItem") { // For some reason list item contents are provided as paragraphs. // Only add a single newline to avoid additional whitespace @@ -576,9 +641,9 @@ export function Map${index}() { break; case "TypeApplication": mdx = mdx.concat( - `${renderToMdx(node.expression)}<${node.applications + `${renderToMdx(node.expression)}\\<${node.applications .map((application) => renderToMdx(application)) - .join("|")}>`, + .join(", ")}\\>`, ); break; case "NameExpression": @@ -593,9 +658,12 @@ export function Map${index}() { break; case "UnionType": mdx = mdx.concat( - `${node.elements.map((element) => renderToMdx(element)).join("|")}`, + `${node.elements.map((element) => renderToMdx(element)).join(" | ")}`, ); break; + case "StringLiteralType": + mdx = mdx.concat(`"${node.value}"`); + break; case "UndefinedLiteral": mdx = mdx.concat("undefined"); break; @@ -605,8 +673,12 @@ export function Map${index}() { case "AllLiteral": mdx = mdx.concat("\\*"); break; + case "VoidLiteral": + mdx = mdx.concat("void"); + break; default: - throw new Error(node.type + " not supported"); + console.log(JSON.stringify(node)); + throw new Error(`renderToMdx ${node.type} not supported`); } return mdx; } From dc04b5fdc7ab315f0ecb82ea9d23665b06285c2c Mon Sep 17 00:00:00 2001 From: James Beard Date: Thu, 10 Oct 2024 16:39:10 +1100 Subject: [PATCH 4/8] Had to abandon custom @turfcategory tag approach. generate-api-mdx uses documentation.yml in a new way that is less prone to leaving out functions that aren't explicitly listed by throwing them in to "Other". Backporting a fix in example code to archived 7.1.0 documentation. --- scripts/generate-api-mdx.ts | 99 +++++++++++++++++-- .../version-7.1.0/api/shortestPath.mdx | 46 ++++----- 2 files changed, 113 insertions(+), 32 deletions(-) diff --git a/scripts/generate-api-mdx.ts b/scripts/generate-api-mdx.ts index 31dd63cf..9e78f096 100644 --- a/scripts/generate-api-mdx.ts +++ b/scripts/generate-api-mdx.ts @@ -27,6 +27,18 @@ import * as prettier from "prettier"; // on the @turfcategory tag embedded within the JSDoc. const docs = yaml.load(path.join(srcPathDir, "documentation.yml")); + function getCategory(memberName) { + const matchingTocs = Object.keys(docs.toc).filter( + (tocName) => + docs.toc[tocName].filter((item) => item === memberName).length > 0, + ); + if (matchingTocs.length === 1) { + return matchingTocs[0]; + } else { + return "Other"; + } + } + // We do add some MDN links for common Javascript types. We don't keep them in // documentation.yml as the README.md files generated from the turf repo have // this taken care of automatically. @@ -96,11 +108,19 @@ import * as prettier from "prettier"; const typedefMembers = members.filter((member) => member?.kind === "typedef"); - // Add a link entry to docs.paths for each typedef. Make the path the file - // (rather than the URL) and Docusaurus will handle relative links for us. + const constantMembers = members.filter( + (member) => member?.kind === "constant", + ); + + // Add a link entry to docs.paths for each typedef and constant. Make the path + // the file (rather than the URL) and Docusaurus will handle relative links + // for us. typedefMembers.forEach((member) => { docs.paths[member.name] = `docs/api/types/${member.name}.mdx`; }); + constantMembers.forEach((member) => { + docs.paths[member.name] = `docs/api/constants/${member.name}.mdx`; + }); const functionMembers = members.filter( (member) => member?.kind === "function", @@ -154,13 +174,43 @@ import * as prettier from "prettier"; }), ); - const sidebarBucketKeys = Object.keys(sidebarBuckets).sort(); + await Promise.all( + constantMembers.map(async (member) => { + let filename: string | undefined = undefined, + category: string | undefined = undefined, + mdx: string | undefined = undefined; + + [filename, category, mdx] = constantJsonToMdx(member); + + if (filename && category && mdx) { + const prettyMdx = await prettier.format(mdx, { + parser: "mdx", + trailingSemi: "none", + }); + const fileurl = path.join("api", "constants", `${filename}`); + const filepath = `${fileurl}.mdx`; + + fs.writeFileSync(path.join(docsOutDir, filepath), prettyMdx); + addToSidebar(category, fileurl); + } else { + console.log(`skipping ${member.kind} ${member.name}`); + } + }), + ); + + let sidebarBucketKeys = Object.keys(docs.toc).concat([ + "Other", + "Type Definitions", + "Constants", + ]); + // console.log(JSON.stringify(sidebarBuckets)); + const sidebarConfig: SidebarConfig[] = []; for (const key of sidebarBucketKeys) { sidebarConfig.push({ type: "category", label: key, - collapsed: true, + collapsed: false, items: sidebarBuckets[key].sort(), }); } @@ -196,8 +246,6 @@ export default ${JSON.stringify(sidebarConfig)}`; } function typedefJsonToMdx(typedef) { - let mdx = ""; - const name = typedef.name; const filename = name; @@ -220,6 +268,33 @@ ${description} ${definition} +`, + ]; + } + + function constantJsonToMdx(member) { + const name = member.name; + const filename = name; + + const description = getDescriptionMdx(member); + + const value = renderTypedefToMdx(member); + + return [ + filename, + "Constants", + `--- +title: ${name} +--- + +### Description + +${description} + +### Value + +${value} + `, ]; } @@ -281,8 +356,7 @@ ${definition} const returns = getReturnsMdx(fn); - const categoryTag = getTagByTitle(fn, "turfcategory"); - const category = categoryTag?.description ?? "Other"; + const category = getCategory(name); let examples; if (hasExamples(fn)) { @@ -386,7 +460,7 @@ const result = turf.${name}(...); const returnsDescription = ret.description ? `${renderToMdx(ret.description)}` : ""; - mdx = mdx.concat(mdxEscape(` ${returnsType} ${returnsDescription}\n`)); + mdx = mdx.concat(mdxEscape(`${returnsType} ${returnsDescription}\n`)); } return mdx; @@ -602,6 +676,7 @@ export function Map${index}() { break; case "text": case "html": + case "NumericLiteralType": mdx = mdx.concat(node.value); break; case "link": @@ -661,6 +736,12 @@ export function Map${index}() { `${node.elements.map((element) => renderToMdx(element)).join(" | ")}`, ); break; + case "ArrayType": + mdx = mdx.concat("["); + mdx = mdx.concat( + node.elements.map((element) => renderToMdx(element)).join(", "), + ); + break; case "StringLiteralType": mdx = mdx.concat(`"${node.value}"`); break; diff --git a/versioned_docs/version-7.1.0/api/shortestPath.mdx b/versioned_docs/version-7.1.0/api/shortestPath.mdx index 76b8c7c0..98d72104 100644 --- a/versioned_docs/version-7.1.0/api/shortestPath.mdx +++ b/versioned_docs/version-7.1.0/api/shortestPath.mdx @@ -43,7 +43,7 @@ var options = { [0, -3], [0, -7], ], - ]), + ]).geometry, }; var path = turf.shortestPath(start, end, options); @@ -52,28 +52,28 @@ var path = turf.shortestPath(start, end, options); export function Map0() { "use strict"; - // jsdoc example start - var start = [-5, -6]; - var end = [9, -6]; - var options = { - obstacles: turf.polygon([ - [ - [0, -7], - [5, -7], - [5, -3], - [0, -3], - [0, -7], - ], - ]), - }; - - var path = turf.shortestPath(start, end, options); - - //addToMap - var addToMap = { start, end, obstacles: options.obstacles, path }; - // jsdoc example end - - return ; +// jsdoc example start +var start = [-5, -6]; +var end = [9, -6]; +var options = { +obstacles: turf.polygon([ +[ +[0, -7], +[5, -7], +[5, -3], +[0, -3], +[0, -7], +], +]).geometry, +}; + +var path = turf.shortestPath(start, end, options); + +//addToMap +var addToMap = { start, end, obstacles: options.obstacles, path }; +// jsdoc example end + +return ; } From 88cdcf70a7c3a957798b0003dab2315dc91476e5 Mon Sep 17 00:00:00 2001 From: James Beard Date: Thu, 24 Oct 2024 21:08:03 +1100 Subject: [PATCH 5/8] Updating to meaningful meta info in a couple of places. --- src/pages/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index f9b50115..9225e1a2 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -59,8 +59,8 @@ export default function Home() { const { siteConfig } = useDocusaurusContext(); return (
From 005af0283e8b325a1bcade8fe5a4ae3bb8ae35e5 Mon Sep 17 00:00:00 2001 From: James Beard Date: Thu, 24 Oct 2024 22:56:57 +1100 Subject: [PATCH 6/8] Added a snippet of code to each API page to make a window.turf variable available in the browser so users can experiment from the console. Resolves #201 --- scripts/generate-api-mdx.ts | 19 ++++++++++++++++++- src/components/WindowTurfGlobal/index.js | 12 ++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/components/WindowTurfGlobal/index.js diff --git a/scripts/generate-api-mdx.ts b/scripts/generate-api-mdx.ts index 9e78f096..1d88017e 100644 --- a/scripts/generate-api-mdx.ts +++ b/scripts/generate-api-mdx.ts @@ -260,6 +260,13 @@ export default ${JSON.stringify(sidebarConfig)}`; title: ${name} --- +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ${description} @@ -287,6 +294,13 @@ ${definition} title: ${name} --- +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ${description} @@ -374,8 +388,12 @@ title: ${name} import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + +{() => } + ### Description ${description} @@ -553,7 +571,6 @@ export function Map${index}() { return ; } - {() => } `); } diff --git a/src/components/WindowTurfGlobal/index.js b/src/components/WindowTurfGlobal/index.js new file mode 100644 index 00000000..00006ff0 --- /dev/null +++ b/src/components/WindowTurfGlobal/index.js @@ -0,0 +1,12 @@ +import React from "react"; + +export default function WindowTurfGlobal(props) { + const { turf } = props; + + if (! window.turf) { + window.turf = turf; + console.log("🧪 Experiment with Turf right here in the console! Try typing %cturf.distance([1, 1], [2, 2]);", "font-weight: bold"); + } + + return <>; +} From 4bfbd4727d2627346e3278f79576416e5267976f Mon Sep 17 00:00:00 2001 From: James Beard Date: Fri, 25 Oct 2024 11:35:16 +1100 Subject: [PATCH 7/8] Regenerating "Next" documentation based on latest code in Turf master. --- CONTRIBUTING.md | 4 +- api-sidebar.ts | 55 +++++++++- docs/api/along.mdx | 23 +++-- docs/api/angle.mdx | 26 ++--- docs/api/area.mdx | 19 ++-- docs/api/azimuthToBearing.mdx | 43 ++++++++ docs/api/bbox.mdx | 21 ++-- docs/api/bboxClip.mdx | 11 +- docs/api/bboxPolygon.mdx | 23 +++-- docs/api/bearing.mdx | 23 +++-- docs/api/bearingToAzimuth.mdx | 16 +-- docs/api/bezierSpline.mdx | 19 ++-- docs/api/booleanClockwise.mdx | 16 +-- docs/api/booleanConcave.mdx | 10 +- docs/api/booleanContains.mdx | 10 +- docs/api/booleanCrosses.mdx | 10 +- docs/api/booleanDisjoint.mdx | 20 ++-- docs/api/booleanEqual.mdx | 14 +-- docs/api/booleanIntersects.mdx | 60 ++++++++--- docs/api/booleanOverlap.mdx | 10 +- docs/api/booleanParallel.mdx | 10 +- docs/api/booleanPointInPolygon.mdx | 26 ++--- docs/api/booleanPointOnLine.mdx | 16 +-- docs/api/booleanTouches.mdx | 10 +- docs/api/booleanValid.mdx | 10 +- docs/api/booleanWithin.mdx | 10 +- docs/api/buffer.mdx | 19 ++-- docs/api/center.mdx | 25 ++--- docs/api/centerMean.mdx | 27 ++--- docs/api/centerMedian.mdx | 27 ++--- docs/api/centerOfMass.mdx | 21 ++-- docs/api/centroid.mdx | 21 ++-- docs/api/circle.mdx | 27 ++--- docs/api/cleanCoords.mdx | 14 +-- docs/api/clone.mdx | 10 +- docs/api/clusterEach.mdx | 17 ++-- docs/api/clusterReduce.mdx | 22 ++-- docs/api/clustersDbscan.mdx | 21 ++-- docs/api/clustersKmeans.mdx | 17 ++-- docs/api/collect.mdx | 15 +-- docs/api/collectionOf.mdx | 15 ++- docs/api/combine.mdx | 11 +- docs/api/concave.mdx | 17 ++-- docs/api/constants/K_TABLE.mdx | 30 ++++++ docs/api/constants/areaFactors.mdx | 19 ++++ docs/api/constants/earthRadius.mdx | 19 ++++ docs/api/constants/factors.mdx | 21 ++++ docs/api/containsNumber.mdx | 16 +-- docs/api/convertArea.mdx | 20 ++-- docs/api/convertLength.mdx | 20 ++-- docs/api/convex.mdx | 23 +++-- docs/api/coordAll.mdx | 16 +-- docs/api/coordEach.mdx | 17 ++-- docs/api/coordReduce.mdx | 22 ++-- docs/api/degreesToRadians.mdx | 16 +-- docs/api/destination.mdx | 27 ++--- docs/api/difference.mdx | 11 +- docs/api/directionalMean.mdx | 16 +-- docs/api/dissolve.mdx | 20 ++-- docs/api/distance.mdx | 25 ++--- docs/api/distanceWeight.mdx | 28 ++--- docs/api/ellipse.mdx | 33 +++--- docs/api/envelope.mdx | 11 +- docs/api/explode.mdx | 11 +- docs/api/feature.mdx | 25 +++-- docs/api/featureCollection.mdx | 22 ++-- docs/api/featureEach.mdx | 15 ++- docs/api/featureOf.mdx | 17 +++- docs/api/featureReduce.mdx | 20 ++-- docs/api/findPoint.mdx | 24 +++-- docs/api/findSegment.mdx | 24 +++-- docs/api/flatten.mdx | 11 +- docs/api/flattenEach.mdx | 15 ++- docs/api/flattenReduce.mdx | 20 ++-- docs/api/flip.mdx | 21 ++-- docs/api/geojsonType.mdx | 17 +++- docs/api/geomEach.mdx | 15 ++- docs/api/geomReduce.mdx | 20 ++-- docs/api/geometry.mdx | 21 ++-- docs/api/geometryCollection.mdx | 26 ++--- docs/api/getCluster.mdx | 10 +- docs/api/getCoord.mdx | 16 +-- docs/api/getCoords.mdx | 16 +-- docs/api/getGeom.mdx | 10 +- docs/api/getType.mdx | 19 ++-- docs/api/greatCircle.mdx | 27 ++--- docs/api/hexGrid.mdx | 21 ++-- docs/api/interpolate.mdx | 23 +++-- docs/api/intersect.mdx | 15 +-- docs/api/isNumber.mdx | 16 +-- docs/api/isObject.mdx | 16 +-- docs/api/isobands.mdx | 26 ++--- docs/api/isolines.mdx | 27 ++--- docs/api/kinks.mdx | 11 +- docs/api/length.mdx | 15 +-- docs/api/lengthToDegrees.mdx | 18 ++-- docs/api/lengthToRadians.mdx | 18 ++-- docs/api/lineArc.mdx | 29 +++--- docs/api/lineChunk.mdx | 19 ++-- docs/api/lineEach.mdx | 15 ++- docs/api/lineIntersect.mdx | 25 ++--- docs/api/lineOffset.mdx | 17 ++-- docs/api/lineOverlap.mdx | 15 +-- docs/api/lineReduce.mdx | 20 ++-- docs/api/lineSegment.mdx | 11 +- docs/api/lineSlice.mdx | 11 +- docs/api/lineSliceAlong.mdx | 19 ++-- docs/api/lineSplit.mdx | 11 +- docs/api/lineString.mdx | 24 +++-- docs/api/lineStrings.mdx | 24 +++-- docs/api/lineToPolygon.mdx | 21 ++-- docs/api/mask.mdx | 38 +++---- docs/api/midpoint.mdx | 30 +++--- docs/api/moranIndex.mdx | 27 +++-- docs/api/multiLineString.mdx | 24 +++-- docs/api/multiPoint.mdx | 24 +++-- docs/api/multiPolygon.mdx | 24 +++-- docs/api/nearestNeighborAnalysis.mdx | 102 +++++++++++++++++++ docs/api/nearestPoint.mdx | 15 +-- docs/api/nearestPointOnLine.mdx | 25 ++--- docs/api/nearestPointToLine.mdx | 17 ++-- docs/api/pNormDistance.mdx | 17 ++-- docs/api/planepoint.mdx | 32 +++--- docs/api/point.mdx | 24 +++-- docs/api/pointGrid.mdx | 29 +++--- docs/api/pointOnFeature.mdx | 11 +- docs/api/pointToLineDistance.mdx | 28 ++--- docs/api/points.mdx | 24 +++-- docs/api/pointsWithinPolygon.mdx | 11 +- docs/api/polygon.mdx | 24 +++-- docs/api/polygonSmooth.mdx | 15 +-- docs/api/polygonTangents.mdx | 11 +- docs/api/polygonToLine.mdx | 15 +-- docs/api/polygonize.mdx | 10 +- docs/api/polygons.mdx | 24 +++-- docs/api/propEach.mdx | 9 +- docs/api/propReduce.mdx | 20 ++-- docs/api/quadratAnalysis.mdx | 22 ++-- docs/api/radiansToDegrees.mdx | 16 +-- docs/api/radiansToLength.mdx | 18 ++-- docs/api/randomLineString.mdx | 26 ++--- docs/api/randomPoint.mdx | 20 ++-- docs/api/randomPolygon.mdx | 24 +++-- docs/api/randomPosition.mdx | 16 +-- docs/api/rbush.mdx | 16 +-- docs/api/rectangleGrid.mdx | 79 ++++++++++++++ docs/api/rewind.mdx | 23 +++-- docs/api/rhumbBearing.mdx | 23 +++-- docs/api/rhumbDestination.mdx | 27 ++--- docs/api/rhumbDistance.mdx | 23 +++-- docs/api/round.mdx | 18 ++-- docs/api/sample.mdx | 20 ++-- docs/api/sector.mdx | 31 +++--- docs/api/segmentEach.mdx | 15 ++- docs/api/segmentReduce.mdx | 11 +- docs/api/shortestPath.mdx | 33 +++--- docs/api/simplify.mdx | 25 ++--- docs/api/square.mdx | 24 ++--- docs/api/squareGrid.mdx | 29 +++--- docs/api/standardDeviationalEllipse.mdx | 35 +++---- docs/api/tag.mdx | 15 +-- docs/api/tesselate.mdx | 29 +++--- docs/api/tin.mdx | 11 +- docs/api/toMercator.mdx | 21 ++-- docs/api/toWgs84.mdx | 21 ++-- docs/api/transformRotate.mdx | 39 +++---- docs/api/transformScale.mdx | 41 ++++---- docs/api/transformTranslate.mdx | 29 +++--- docs/api/triangleGrid.mdx | 29 +++--- docs/api/truncate.mdx | 25 ++--- docs/api/types/AllGeoJSON.mdx | 19 ++++ docs/api/types/AreaUnits.mdx | 19 ++++ docs/api/types/Corners.mdx | 19 ++++ docs/api/types/Dbscan.mdx | 19 ++++ docs/api/types/DbscanProps.mdx | 26 +++++ docs/api/types/DirectionalMeanLine.mdx | 29 ++++++ docs/api/types/Grid.mdx | 19 ++++ docs/api/types/Lines.mdx | 19 ++++ docs/api/types/MoranIndex.mdx | 26 +++++ docs/api/types/NearestNeighborStatistics.mdx | 29 ++++++ docs/api/types/NearestNeighborStudyArea.mdx | 26 +++++ docs/api/types/QuadratAnalysisResult.mdx | 28 +++++ docs/api/types/Units.mdx | 19 ++++ docs/api/types/clusterEachCallback.mdx | 31 ++++++ docs/api/types/clusterReduceCallback.mdx | 45 ++++++++ docs/api/types/coordEachCallback.mdx | 33 ++++++ docs/api/types/coordReduceCallback.mdx | 47 +++++++++ docs/api/types/featureEachCallback.mdx | 30 ++++++ docs/api/types/featureReduceCallback.mdx | 44 ++++++++ docs/api/types/flattenEachCallback.mdx | 31 ++++++ docs/api/types/flattenReduceCallback.mdx | 45 ++++++++ docs/api/types/geomEachCallback.mdx | 33 ++++++ docs/api/types/geomReduceCallback.mdx | 47 +++++++++ docs/api/types/lineEachCallback.mdx | 32 ++++++ docs/api/types/lineReduceCallback.mdx | 46 +++++++++ docs/api/types/propEachCallback.mdx | 30 ++++++ docs/api/types/propReduceCallback.mdx | 44 ++++++++ docs/api/types/segmentEachCallback.mdx | 33 ++++++ docs/api/types/segmentReduceCallback.mdx | 47 +++++++++ docs/api/union.mdx | 22 ++-- docs/api/unkinkPolygon.mdx | 31 +++--- docs/api/voronoi.mdx | 37 +++---- turf | 2 +- 203 files changed, 3115 insertions(+), 1496 deletions(-) create mode 100644 docs/api/azimuthToBearing.mdx create mode 100644 docs/api/constants/K_TABLE.mdx create mode 100644 docs/api/constants/areaFactors.mdx create mode 100644 docs/api/constants/earthRadius.mdx create mode 100644 docs/api/constants/factors.mdx create mode 100644 docs/api/nearestNeighborAnalysis.mdx create mode 100644 docs/api/rectangleGrid.mdx create mode 100644 docs/api/types/AllGeoJSON.mdx create mode 100644 docs/api/types/AreaUnits.mdx create mode 100644 docs/api/types/Corners.mdx create mode 100644 docs/api/types/Dbscan.mdx create mode 100644 docs/api/types/DbscanProps.mdx create mode 100644 docs/api/types/DirectionalMeanLine.mdx create mode 100644 docs/api/types/Grid.mdx create mode 100644 docs/api/types/Lines.mdx create mode 100644 docs/api/types/MoranIndex.mdx create mode 100644 docs/api/types/NearestNeighborStatistics.mdx create mode 100644 docs/api/types/NearestNeighborStudyArea.mdx create mode 100644 docs/api/types/QuadratAnalysisResult.mdx create mode 100644 docs/api/types/Units.mdx create mode 100644 docs/api/types/clusterEachCallback.mdx create mode 100644 docs/api/types/clusterReduceCallback.mdx create mode 100644 docs/api/types/coordEachCallback.mdx create mode 100644 docs/api/types/coordReduceCallback.mdx create mode 100644 docs/api/types/featureEachCallback.mdx create mode 100644 docs/api/types/featureReduceCallback.mdx create mode 100644 docs/api/types/flattenEachCallback.mdx create mode 100644 docs/api/types/flattenReduceCallback.mdx create mode 100644 docs/api/types/geomEachCallback.mdx create mode 100644 docs/api/types/geomReduceCallback.mdx create mode 100644 docs/api/types/lineEachCallback.mdx create mode 100644 docs/api/types/lineReduceCallback.mdx create mode 100644 docs/api/types/propEachCallback.mdx create mode 100644 docs/api/types/propReduceCallback.mdx create mode 100644 docs/api/types/segmentEachCallback.mdx create mode 100644 docs/api/types/segmentReduceCallback.mdx diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8bd0ba2..92eac385 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ $ git -C turf/ checkout 68915ee Now that the `turf/` submodule points to 7.1.0 code regenerate the API documentation: ``` -$ npx tsx ./scripts/generate-api-mdx.ts +$ npm run generate-api-mdx ``` You will likely see many changes to MDX files in the `docs/` directory. @@ -71,7 +71,7 @@ You will now see many more changes in the `versioned_docs` directory. This is th ``` $ git submodule update --init -$ npx tsx ./scripts/generate-api-mdx.ts +$ npm run generate-api-mdx ``` Most, if not all, of the changes in docs/ should revert. If any remain review them as they may have previously been committed as manual corrections (and thus can be discarded). diff --git a/api-sidebar.ts b/api-sidebar.ts index 622a9c57..1600badb 100644 --- a/api-sidebar.ts +++ b/api-sidebar.ts @@ -220,6 +220,7 @@ export default [ "api/booleanCrosses", "api/booleanDisjoint", "api/booleanEqual", + "api/booleanIntersects", "api/booleanOverlap", "api/booleanParallel", "api/booleanPointInPolygon", @@ -233,6 +234,7 @@ export default [ label: "Unit Conversion", collapsed: false, items: [ + "api/azimuthToBearing", "api/bearingToAzimuth", "api/convertArea", "api/convertLength", @@ -251,7 +253,6 @@ export default [ collapsed: false, items: [ "api/angle", - "api/booleanIntersects", "api/booleanValid", "api/centerMean", "api/centerMedian", @@ -266,17 +267,63 @@ export default [ "api/lineEach", "api/lineReduce", "api/lineStrings", - "api/mean", "api/moranIndex", + "api/nearestNeighborAnalysis", "api/nearestPointToLine", "api/pNormDistance", "api/points", "api/polygons", - "api/pt", "api/quadratAnalysis", "api/rbush", + "api/rectangleGrid", "api/standardDeviationalEllipse", - "api/variance", + ], + }, + { + type: "category", + label: "Type Definitions", + collapsed: false, + items: [ + "api/types/AllGeoJSON", + "api/types/AreaUnits", + "api/types/Corners", + "api/types/Dbscan", + "api/types/DbscanProps", + "api/types/DirectionalMeanLine", + "api/types/Grid", + "api/types/Lines", + "api/types/MoranIndex", + "api/types/NearestNeighborStatistics", + "api/types/NearestNeighborStudyArea", + "api/types/QuadratAnalysisResult", + "api/types/Units", + "api/types/clusterEachCallback", + "api/types/clusterReduceCallback", + "api/types/coordEachCallback", + "api/types/coordReduceCallback", + "api/types/featureEachCallback", + "api/types/featureReduceCallback", + "api/types/flattenEachCallback", + "api/types/flattenReduceCallback", + "api/types/geomEachCallback", + "api/types/geomReduceCallback", + "api/types/lineEachCallback", + "api/types/lineReduceCallback", + "api/types/propEachCallback", + "api/types/propReduceCallback", + "api/types/segmentEachCallback", + "api/types/segmentReduceCallback", + ], + }, + { + type: "category", + label: "Constants", + collapsed: false, + items: [ + "api/constants/K_TABLE", + "api/constants/areaFactors", + "api/constants/earthRadius", + "api/constants/factors", ], }, ]; diff --git a/docs/api/along.mdx b/docs/api/along.mdx index ca59a778..d849bd0c 100644 --- a/docs/api/along.mdx +++ b/docs/api/along.mdx @@ -4,27 +4,29 @@ title: along import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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? | **Object** | Optional parameters | -| options.units? | **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)\> \| [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)** | input line | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance along the line | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | can be degrees, radians, miles, or kilometers _(default "kilometers")_ | ### Returns -
    - **[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 ### Examples @@ -59,7 +61,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/angle.mdx b/docs/api/angle.mdx index 8b144f23..f8ecedcc 100644 --- a/docs/api/angle.mdx +++ b/docs/api/angle.mdx @@ -4,8 +4,13 @@ title: angle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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) @@ -13,21 +18,18 @@ angle with origin on the `startPoint-midPoint` segment, or its explementary angl ### 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? | **Object** | Optional parameters _(default \{\})_ | -| options.explementary? | **boolean** | Returns the explementary angle instead (360 - angle) _(default false)_ | -| options.mercator? | **boolean** | if calculations should be performed over Mercator or WGS84 projection _(default false)_ | +| 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? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.explementary? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | Returns the explementary angle instead (360 - angle) _(default false)_ | +| options.mercator? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | if calculations should be performed over Mercator or WGS84 projection _(default false)_ | ### Returns -
    - **number** Angle between the provided points, or its explementary. - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Angle between the provided points, or its explementary. ### Examples diff --git a/docs/api/area.mdx b/docs/api/area.mdx index c0e61727..464a74db 100644 --- a/docs/api/area.mdx +++ b/docs/api/area.mdx @@ -4,24 +4,26 @@ title: area import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -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 -| Name | Type | Description | -| ------- | ------------------------------------------------------------ | ------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input GeoJSON feature(s) | +| Name | Type | Description | +| ------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input polygon(s) as [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1), [Feature](https://tools.ietf.org/html/rfc7946#section-3.2), or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) | ### Returns -
    - **number** area in square meters - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** area in square meters ### Examples @@ -63,7 +65,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/azimuthToBearing.mdx b/docs/api/azimuthToBearing.mdx new file mode 100644 index 00000000..a8c3c654 --- /dev/null +++ b/docs/api/azimuthToBearing.mdx @@ -0,0 +1,43 @@ +--- +title: azimuthToBearing +--- + +import * as turf from "turf-next"; +import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +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](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | between 0 and 360 degrees | + +### Returns + +**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** bearing between -180 and +180 degrees + +### 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(...); +``` diff --git a/docs/api/bbox.mdx b/docs/api/bbox.mdx index 246249e5..50015b6d 100644 --- a/docs/api/bbox.mdx +++ b/docs/api/bbox.mdx @@ -4,8 +4,13 @@ title: bbox import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the bounding box for any GeoJSON object, including FeatureCollection. @@ -13,18 +18,15 @@ 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 | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.recompute? | **boolean** | Whether to ignore an existing bbox property on geojson | +| Name | Type | Description | +| ------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON object | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.recompute? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | Whether to ignore an existing bbox property on geojson | ### Returns -
    - **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** bbox extent in [minX, minY, maxX, maxY] order - -
+**[BBox](https://tools.ietf.org/html/rfc7946#section-5)** bbox extent in [minX, minY, maxX, maxY] order ### Examples @@ -57,7 +59,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/bboxClip.mdx b/docs/api/bboxClip.mdx index 5124021f..5bc1aac2 100644 --- a/docs/api/bboxClip.mdx +++ b/docs/api/bboxClip.mdx @@ -4,8 +4,13 @@ title: bboxClip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) and a bbox and clips the feature to the bbox using @@ -21,10 +26,7 @@ May result in degenerate edges when clipping Polygons. ### Returns -
    - **[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 ### Examples @@ -67,7 +69,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/bboxPolygon.mdx b/docs/api/bboxPolygon.mdx index 119619c0..be70ceba 100644 --- a/docs/api/bboxPolygon.mdx +++ b/docs/api/bboxPolygon.mdx @@ -4,27 +4,29 @@ title: bboxPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bbox and returns an equivalent [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). ### Parameters -| Name | Type | Description | -| -------------------------- | --------------------------------------------------------- | ------------------------------------------------ | -| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Properties** | Translate properties to Polygon _(default \{\})_ | -| options.id? | **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? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | Translate properties to Polygon _(default \{\})_ | +| options.id? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Translate Id to Polygon _(default \{\})_ | ### Returns -
    - **[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 ### Examples @@ -49,7 +51,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/bearing.mdx b/docs/api/bearing.mdx index 91af3bf3..2883b400 100644 --- a/docs/api/bearing.mdx +++ b/docs/api/bearing.mdx @@ -4,8 +4,13 @@ title: bearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the geographic bearing between them, @@ -13,19 +18,16 @@ i.e. the angle measured in degrees from the north line (0 degrees) ### Parameters -| Name | Type | Description | -| --------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | -| 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? | **Object** | Optional parameters _(default \{\})_ | -| options.final? | **boolean** | calculates the final bearing if true _(default false)_ | +| Name | Type | Description | +| --------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| 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? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.final? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | calculates the final bearing if true _(default false)_ | ### Returns -
    - **number** bearing in decimal degrees, between -180 and 180 degrees (positive clockwise) - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** bearing in decimal degrees, between -180 and 180 degrees (positive clockwise) ### Examples @@ -55,7 +57,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/bearingToAzimuth.mdx b/docs/api/bearingToAzimuth.mdx index 7f61defa..79b744e7 100644 --- a/docs/api/bearingToAzimuth.mdx +++ b/docs/api/bearingToAzimuth.mdx @@ -4,8 +4,13 @@ title: bearingToAzimuth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts any bearing angle from the north line direction (positive clockwise) @@ -13,16 +18,13 @@ and returns an angle between 0-360 degrees (positive clockwise), 0 being the nor ### Parameters -| Name | Type | Description | -| ------- | ---------- | ------------------------------------ | -| bearing | **number** | angle, between -180 and +180 degrees | +| Name | Type | Description | +| ------- | ----------------------------------------------------------------------------------------------- | ------------------------------------ | +| bearing | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle, between -180 and +180 degrees | ### Returns -
    - **number** angle between 0 and 360 degrees - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** angle between 0 and 360 degrees ### Installation diff --git a/docs/api/bezierSpline.mdx b/docs/api/bezierSpline.mdx index 3062a93c..04b98e98 100644 --- a/docs/api/bezierSpline.mdx +++ b/docs/api/bezierSpline.mdx @@ -4,8 +4,13 @@ title: bezierSpline import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a curved version @@ -19,17 +24,14 @@ The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc | 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? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | Translate properties to output _(default \{\})_ | -| options.resolution? | **number** | time in milliseconds between points _(default 10000)_ | -| options.sharpness? | **number** | a measure of how curvy the path should be between splines _(default 0.85)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate properties to output _(default \{\})_ | +| options.resolution? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | time in milliseconds between points _(default 10000)_ | +| options.sharpness? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | a measure of how curvy the path should be between splines _(default 0.85)_ | ### Returns -
    - **[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 ### Examples @@ -69,7 +71,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/booleanClockwise.mdx b/docs/api/booleanClockwise.mdx index 923ea0a0..dc8477e7 100644 --- a/docs/api/booleanClockwise.mdx +++ b/docs/api/booleanClockwise.mdx @@ -4,24 +4,26 @@ title: booleanClockwise import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise. ### 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)\> \| [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| Array\\>** | to be evaluated | +| 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)\> \| [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>\>** | to be evaluated | ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanConcave.mdx b/docs/api/booleanConcave.mdx index 1b100dba..6d0c3c1a 100644 --- a/docs/api/booleanConcave.mdx +++ b/docs/api/booleanConcave.mdx @@ -4,8 +4,13 @@ title: booleanConcave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a polygon and return true or false as to whether it is concave or not. @@ -18,10 +23,7 @@ Takes a polygon and return true or false as to whether it is concave or not. ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanContains.mdx b/docs/api/booleanContains.mdx index 55249a0f..d2e66217 100644 --- a/docs/api/booleanContains.mdx +++ b/docs/api/booleanContains.mdx @@ -4,8 +4,13 @@ title: booleanContains import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-contains returns True if the second geometry is completely contained by the first geometry. @@ -22,10 +27,7 @@ Boolean-contains returns the exact opposite result of the `@turf/boolean-within` ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanCrosses.mdx b/docs/api/booleanCrosses.mdx index ee763d0e..2d86a8ae 100644 --- a/docs/api/booleanCrosses.mdx +++ b/docs/api/booleanCrosses.mdx @@ -4,8 +4,13 @@ title: booleanCrosses import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than @@ -24,10 +29,7 @@ Other comparisons are not supported as they are outside the OpenGIS Simple Featu ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanDisjoint.mdx b/docs/api/booleanDisjoint.mdx index 80b53860..a1c678ed 100644 --- a/docs/api/booleanDisjoint.mdx +++ b/docs/api/booleanDisjoint.mdx @@ -4,25 +4,29 @@ title: booleanDisjoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set. ### Parameters -| Name | Type | Description | -| -------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | -| feature1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | -| feature2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| Name | Type | Description | +| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | +| feature1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| feature2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.ignoreSelfIntersections? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ignores self-intersections on input features _(default false)_ | ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if the intersection is an empty set, false otherwise ### Examples diff --git a/docs/api/booleanEqual.mdx b/docs/api/booleanEqual.mdx index ef285924..ea2e764f 100644 --- a/docs/api/booleanEqual.mdx +++ b/docs/api/booleanEqual.mdx @@ -4,8 +4,13 @@ title: booleanEqual import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Determine whether two geometries of the same type have identical X,Y coordinate values. @@ -17,15 +22,12 @@ See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relatio | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | | feature1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | GeoJSON input | | feature2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | GeoJSON input | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.precision? | **number** | decimal precision to use when comparing coordinates _(default 6)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.precision? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | decimal precision to use when comparing coordinates _(default 6)_ | ### Returns -
    - **boolean** true if the objects are equal, false otherwise - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if the objects are equal, false otherwise ### Examples diff --git a/docs/api/booleanIntersects.mdx b/docs/api/booleanIntersects.mdx index ed889a74..11c35943 100644 --- a/docs/api/booleanIntersects.mdx +++ b/docs/api/booleanIntersects.mdx @@ -4,41 +4,77 @@ title: booleanIntersects import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Boolean-intersects returns (TRUE) two geometries intersect. +Boolean-intersects returns (TRUE) if the intersection of the two geometries is NOT an empty set. ### Parameters -| Name | Type | Description | -| -------- | ------------------------------------------------------------------------------------------------------------------------------------ | --------------------------- | -| feature1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | -| feature2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| Name | Type | Description | +| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | +| feature1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| feature2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | GeoJSON Feature or Geometry | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.ignoreSelfIntersections? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ignores self-intersections on input features _(default false)_ | ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if geometries intersect, false otherwise ### Examples ```javascript -var point = turf.point([2, 2]); +var point1 = turf.point([2, 2]); +var point2 = turf.point([1, 2]); var line = turf.lineString([ [1, 1], - [1, 2], [1, 3], [1, 4], ]); -turf.booleanIntersects(line, point); +turf.booleanIntersects(line, point1); +//=false + +turf.booleanIntersects(line, point2); //=true ``` +export function Map0() { + "use strict"; + + // jsdoc example start + var point1 = turf.point([2, 2]); + var point2 = turf.point([1, 2]); + var line = turf.lineString([ + [1, 1], + [1, 3], + [1, 4], + ]); + + turf.booleanIntersects(line, point1); + //=false + + turf.booleanIntersects(line, point2); + //=true + + //addToMap + var addToMap = { point1, point2, line }; + point1.properties["marker-color"] = "#f00"; + point2.properties["marker-color"] = "#0f0"; + // jsdoc example end + + return ; +} + +{() => } + ### Installation ```javascript diff --git a/docs/api/booleanOverlap.mdx b/docs/api/booleanOverlap.mdx index b4ffe434..7e9cc5f2 100644 --- a/docs/api/booleanOverlap.mdx +++ b/docs/api/booleanOverlap.mdx @@ -4,8 +4,13 @@ title: booleanOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Compares two geometries of the same dimension and returns true if their intersection set results in a geometry @@ -23,10 +28,7 @@ In other words, it returns true if the two geometries overlap, provided that nei ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanParallel.mdx b/docs/api/booleanParallel.mdx index a30cf984..a18193a6 100644 --- a/docs/api/booleanParallel.mdx +++ b/docs/api/booleanParallel.mdx @@ -4,8 +4,13 @@ title: booleanParallel import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2` @@ -19,10 +24,7 @@ Boolean-Parallel returns True if each segment of `line1` is parallel to the corr ### Returns -
    - **boolean** true/false if the lines are parallel - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false if the lines are parallel ### Examples diff --git a/docs/api/booleanPointInPolygon.mdx b/docs/api/booleanPointInPolygon.mdx index 48c8c8d2..4a4f7db3 100644 --- a/docs/api/booleanPointInPolygon.mdx +++ b/docs/api/booleanPointInPolygon.mdx @@ -4,28 +4,30 @@ title: booleanPointInPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) and determines if the point -resides inside the polygon. The polygon can be convex or concave. The function accounts for holes. +Determines if a point lies within a polygon. The polygon can be convex or +concave, or contain holes. ### Parameters -| Name | Type | Description | -| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| point | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | input point | -| polygon | **[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 or multipolygon | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.ignoreBoundary? | **boolean** | True if polygon boundary should be ignored when determining if the point is inside the polygon otherwise false. _(default false)_ | +| Name | Type | Description | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | +| point | **Position \| [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | Point possibly within the polygon. | +| polygon | **[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)\>** | Polygon to search within. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters. _(default \{\})_ | +| options.ignoreBoundary? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | If set to true, a point lying on the polygon boundary is not considered to be within the polygon. _(default false)_ | ### Returns -
    - **boolean** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** True if the point lies within the polygon, false otherwise. ### Examples diff --git a/docs/api/booleanPointOnLine.mdx b/docs/api/booleanPointOnLine.mdx index dcfdbfa1..4a0c186d 100644 --- a/docs/api/booleanPointOnLine.mdx +++ b/docs/api/booleanPointOnLine.mdx @@ -4,8 +4,13 @@ title: booleanPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns true if a point is on a line. Accepts a optional parameter to ignore the @@ -17,16 +22,13 @@ start and end vertices of the linestring. | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | pt | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | GeoJSON Point | | line | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | GeoJSON LineString | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.ignoreEndVertices? | **boolean** | whether to ignore the start and end vertices. _(default false)_ | -| options.epsilon? | **number** | Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.ignoreEndVertices? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether to ignore the start and end vertices. _(default false)_ | +| options.epsilon? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points | ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanTouches.mdx b/docs/api/booleanTouches.mdx index 59ccdf23..c4166e27 100644 --- a/docs/api/booleanTouches.mdx +++ b/docs/api/booleanTouches.mdx @@ -4,8 +4,13 @@ title: booleanTouches import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-touches true if none of the points common to both geometries @@ -20,10 +25,7 @@ intersect the interiors of both geometries. ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanValid.mdx b/docs/api/booleanValid.mdx index 1305686f..2d8b66ec 100644 --- a/docs/api/booleanValid.mdx +++ b/docs/api/booleanValid.mdx @@ -4,8 +4,13 @@ title: booleanValid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description booleanValid checks if the geometry is a valid according to the OGC Simple Feature Specification. @@ -18,10 +23,7 @@ booleanValid checks if the geometry is a valid according to the OGC Simple Featu ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/booleanWithin.mdx b/docs/api/booleanWithin.mdx index 552dca46..9cf17275 100644 --- a/docs/api/booleanWithin.mdx +++ b/docs/api/booleanWithin.mdx @@ -4,8 +4,13 @@ title: booleanWithin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-within returns true if the first geometry is completely within the second geometry. @@ -22,10 +27,7 @@ Boolean-within returns the exact opposite result of the `@turf/boolean-contains` ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/buffer.mdx b/docs/api/buffer.mdx index 1569c00e..6004237f 100644 --- a/docs/api/buffer.mdx +++ b/docs/api/buffer.mdx @@ -4,8 +4,13 @@ title: buffer import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. @@ -21,17 +26,14 @@ the input, or even be empty. | Name | Type | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | input to be buffered | -| radius | **number** | distance to draw the buffer (negative values are allowed) | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | any of the options supported by turf units _(default "kilometers")_ | -| options.steps? | **number** | number of steps _(default 8)_ | +| radius | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance to draw the buffer (negative values are allowed) | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | any of the options supported by turf units _(default "kilometers")_ | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps _(default 8)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [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)\> \| undefined** buffered features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [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)\> \| undefined** buffered features ### Examples @@ -54,7 +56,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/center.mdx b/docs/api/center.mdx index a20269f6..ac07912c 100644 --- a/docs/api/center.mdx +++ b/docs/api/center.mdx @@ -4,28 +4,30 @@ title: center import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the absolute center point of all features. ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | Translate GeoJSON Properties to Point _(default \{\})_ | -| options.bbox? | **Object** | Translate GeoJSON BBox to Point _(default \{\})_ | -| options.id? | **Object** | Translate GeoJSON Id to Point _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON Properties to Point _(default \{\})_ | +| options.bbox? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON BBox to Point _(default \{\})_ | +| options.id? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON Id to Point _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a Point feature at the absolute center point of all input features - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a Point feature at the absolute center point of all input features ### Examples @@ -60,7 +62,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/centerMean.mdx b/docs/api/centerMean.mdx index a8816f0d..4a3c2e0f 100644 --- a/docs/api/centerMean.mdx +++ b/docs/api/centerMean.mdx @@ -4,29 +4,31 @@ title: centerMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the mean center. Can be weighted. ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | Translate GeoJSON Properties to Point _(default \{\})_ | -| options.bbox? | **Object** | Translate GeoJSON BBox to Point _(default \{\})_ | -| options.id? | **Object** | Translate GeoJSON Id to Point _(default \{\})_ | -| options.weight? | **string** | the property name used to weight the center | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON Properties to Point _(default \{\})_ | +| options.bbox? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON BBox to Point _(default \{\})_ | +| options.id? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON Id to Point _(default \{\})_ | +| options.weight? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name used to weight the center | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a Point feature at the mean center point of all input features - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a Point feature at the mean center point of all input features ### Examples @@ -63,7 +65,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/centerMedian.mdx b/docs/api/centerMedian.mdx index 1ba0ca72..9c16835c 100644 --- a/docs/api/centerMedian.mdx +++ b/docs/api/centerMedian.mdx @@ -4,8 +4,13 @@ title: centerMedian import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of points and calculates the median center, @@ -39,7 +44,7 @@ attracted to clustered data. It, too, can be weighted. Harold W. Kuhn and Robert E. Kuenne, “An Efficient Algorithm for the Numerical Solution of the Generalized Weber Problem in Spatial Economics,” _Journal of Regional Science_ 4, no. 2 (1962): 21–33, -doi:[10.1111/j.1467-9787.1962.tb00902.x](https://doi.org/10.1111/j.1467-9787.1962.tb00902.x). +doi:\{@link [https://doi.org/10.1111/j.1467-9787.1962.tb00902.x\}](https://doi.org/10.1111/j.1467-9787.1962.tb00902.x}). James E. Burt, Gerald M. Barber, and David L. Rigby, _Elementary Statistics for Geographers_, 3rd ed., New York: The Guilford @@ -47,20 +52,17 @@ Press, 2009, 150–151. ### Parameters -| Name | Type | Description | -| ------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| features | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | Any GeoJSON Feature Collection | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.weight? | **string** | the property name used to weight the center | -| options.tolerance? | **number** | the difference in distance between candidate medians at which point the algorighim stops iterating. _(default 0.001)_ | -| options.counter? | **number** | how many attempts to find the median, should the tolerance be insufficient. _(default 10)_ | +| Name | Type | Description | +| ------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| features | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | Any GeoJSON Feature Collection | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.weight? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name used to weight the center | +| options.tolerance? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the difference in distance between candidate medians at which point the algorighim stops iterating. _(default 0.001)_ | +| options.counter? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | how many attempts to find the median, should the tolerance be insufficient. _(default 10)_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** The median center of the collection - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** The median center of the collection ### Examples @@ -93,7 +95,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/centerOfMass.mdx b/docs/api/centerOfMass.mdx index 36be1089..459f8ed9 100644 --- a/docs/api/centerOfMass.mdx +++ b/docs/api/centerOfMass.mdx @@ -4,26 +4,28 @@ title: centerOfMass import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns its [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) using this formula: [Centroid of Polygon](https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon). ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------ | ------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.properties? | **Object** | Translate Properties to Feature _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to Feature _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the center of mass - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the center of mass ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/centroid.mdx b/docs/api/centroid.mdx index 637b92d3..e862566d 100644 --- a/docs/api/centroid.mdx +++ b/docs/api/centroid.mdx @@ -4,26 +4,28 @@ title: centroid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Computes the centroid as the mean of all vertices within the object. ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.properties? | **Object** | an Object that is used as the \{@link Feature\}'s properties _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be centered | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | an Object that is used as the [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)'s properties _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the centroid of the input object - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the centroid of the input object ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/circle.mdx b/docs/api/circle.mdx index 42f3e213..a1e4e73b 100644 --- a/docs/api/circle.mdx +++ b/docs/api/circle.mdx @@ -4,29 +4,31 @@ title: circle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision. ### Parameters -| Name | Type | Description | -| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| center | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| Array\** | center point | -| radius | **number** | radius of the circle | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.steps? | **number** | number of steps _(default 64)_ | -| options.units? | **string** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | -| options.properties? | **Object** | properties _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | +| center | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | center point | +| radius | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | radius of the circle | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps _(default 64)_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | properties _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** circle polygon - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** circle polygon ### Examples @@ -53,7 +55,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/cleanCoords.mdx b/docs/api/cleanCoords.mdx index 57062d5b..656c1b9b 100644 --- a/docs/api/cleanCoords.mdx +++ b/docs/api/cleanCoords.mdx @@ -4,8 +4,13 @@ title: cleanCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Removes redundant coordinates from any GeoJSON Geometry. @@ -15,15 +20,12 @@ Removes redundant coordinates from any GeoJSON Geometry. | Name | Type | Description | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | geojson | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | Feature or Geometry | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated _(default false)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated _(default false)_ | ### Returns -
    - **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** the cleaned input Feature/Geometry - -
+**[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** the cleaned input Feature/Geometry ### Examples diff --git a/docs/api/clone.mdx b/docs/api/clone.mdx index 34e86b9b..7b20e1f9 100644 --- a/docs/api/clone.mdx +++ b/docs/api/clone.mdx @@ -4,8 +4,13 @@ title: clone import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'. @@ -19,10 +24,7 @@ Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** cloned GeoJSON Object - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** cloned GeoJSON Object ### Examples diff --git a/docs/api/clusterEach.mdx b/docs/api/clusterEach.mdx index 711af2ed..d771476b 100644 --- a/docs/api/clusterEach.mdx +++ b/docs/api/clusterEach.mdx @@ -4,23 +4,28 @@ title: clusterEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description clusterEach ### Parameters -| Name | Type | Description | -| -------- | ------------------------------------------------------------------------ | --------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | GeoJSON Features | -| property | **string \| number** | GeoJSON property key/value used to create clusters | -| callback | **Function** | a method that takes (cluster, clusterValue, currentIndex) | +| Name | Type | Description | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | GeoJSON Features | +| property | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | GeoJSON property key/value used to create clusters | +| callback | **[clusterEachCallback](docs/api/types/clusterEachCallback.mdx)** | a method that takes (cluster, clusterValue, currentIndex) | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/clusterReduce.mdx b/docs/api/clusterReduce.mdx index fb8192ec..ba6ce543 100644 --- a/docs/api/clusterReduce.mdx +++ b/docs/api/clusterReduce.mdx @@ -4,27 +4,29 @@ title: clusterReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce clusters in GeoJSON Features, similar to Array.reduce() ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | GeoJSON Features | -| property | **string \| number** | GeoJSON property key/value used to create clusters | -| callback | **Function** | a method that takes (previousValue, cluster, clusterValue, currentIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | GeoJSON Features | +| property | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | GeoJSON property key/value used to create clusters | +| callback | **[clusterReduceCallback](docs/api/types/clusterReduceCallback.mdx)** | a method that takes (previousValue, cluster, clusterValue, currentIndex) | +| initialValue? | **any** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**any** The value that results from the reduction. ### Examples diff --git a/docs/api/clustersDbscan.mdx b/docs/api/clustersDbscan.mdx index f7335b38..63795d0c 100644 --- a/docs/api/clustersDbscan.mdx +++ b/docs/api/clustersDbscan.mdx @@ -4,8 +4,13 @@ title: clustersDbscan import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters according to [DBSCAN's](https://en.wikipedia.org/wiki/DBSCAN) data clustering algorithm. @@ -15,22 +20,19 @@ Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and p | Name | Type | Description | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | to be clustered | -| maxDistance | **number** | Maximum Distance between any point of the cluster to generate the clusters (kilometers only) | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | in which `maxDistance` is expressed, can be degrees, radians, miles, or kilometers _(default "kilometers")_ | -| options.mutate? | **boolean** | Allows GeoJSON input to be mutated _(default false)_ | -| options.minPoints? | **number** | Minimum number of points to generate a single cluster, points which do not meet this requirement will be classified as an 'edge' or 'noise'. _(default 3)_ | +| maxDistance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Maximum Distance between any point of the cluster to generate the clusters (kilometers by default, see options) | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | in which `maxDistance` is expressed, can be degrees, radians, miles, or kilometers _(default "kilometers")_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | Allows GeoJSON input to be mutated _(default false)_ | +| options.minPoints? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Minimum number of points to generate a single cluster, points which do not meet this requirement will be classified as an 'edge' or 'noise'. _(default 3)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Clustered Points with an additional two properties associated to each Feature: +**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [DbscanProps](docs/api/types/DbscanProps.mdx)\>** Clustered Points with an additional two properties associated to each Feature: - \{number\} cluster - the associated clusterId - \{string\} dbscan - type of point it has been classified as ('core' \| 'edge' \| 'noise') -
- ### Examples ```javascript @@ -56,7 +58,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/clustersKmeans.mdx b/docs/api/clustersKmeans.mdx index 963f9e2a..b3a61c00 100644 --- a/docs/api/clustersKmeans.mdx +++ b/docs/api/clustersKmeans.mdx @@ -4,8 +4,13 @@ title: clustersKmeans import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters using the k-mean . @@ -16,20 +21,17 @@ It uses the [k-means algorithm](https://en.wikipedia.org/wiki/K-means_clustering | Name | Type | Description | | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | to be clustered | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.numberOfClusters? | **number** | numberOfClusters that will be generated _(default Math.sqrt(numberOfPoints/2))_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.numberOfClusters? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | numberOfClusters that will be generated _(default Math.sqrt(numberOfPoints/2))_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Clustered Points with an additional two properties associated to each Feature: +**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Clustered Points with an additional two properties associated to each Feature: - \{number\} cluster - the associated clusterId - \{[number, number]\} centroid - Centroid of the cluster [Longitude, Latitude] -
- ### Examples ```javascript @@ -55,7 +57,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/collect.mdx b/docs/api/collect.mdx index 3953dbd2..073bca1d 100644 --- a/docs/api/collect.mdx +++ b/docs/api/collect.mdx @@ -4,8 +4,13 @@ title: collect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Merges a specified property from a FeatureCollection of points into a @@ -20,15 +25,12 @@ on the polygon. | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | polygons | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | polygons with values on which to aggregate | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | points to be aggregated | -| inProperty | **string** | property to be nested from | -| outProperty | **string** | property to be nested into | +| inProperty | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | property to be nested from | +| outProperty | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | property to be nested into | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** polygons with properties listed based on `outField` - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** polygons with properties listed based on `outField` ### Examples @@ -103,7 +105,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/collectionOf.mdx b/docs/api/collectionOf.mdx index b4049c69..35b4d8cb 100644 --- a/docs/api/collectionOf.mdx +++ b/docs/api/collectionOf.mdx @@ -4,8 +4,13 @@ title: collectionOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inputs for Turf. @@ -13,11 +18,11 @@ Internally this uses [geojsonType](geojsonType) to judge geometry types. ### Parameters -| Name | Type | Description | -| ----------------- | ------------------------------------------------------------------------ | ----------------------------------------------------- | -| featureCollection | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | a FeatureCollection for which features will be judged | -| type | **string** | expected GeoJSON type | -| name | **string** | name of calling function | +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------- | +| featureCollection | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | a FeatureCollection for which features will be judged | +| type | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | expected GeoJSON type | +| name | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | name of calling function | ### Returns diff --git a/docs/api/combine.mdx b/docs/api/combine.mdx index ac2c8e72..b622c8f2 100644 --- a/docs/api/combine.mdx +++ b/docs/api/combine.mdx @@ -4,8 +4,13 @@ title: combine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Combines a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), or [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) features @@ -19,10 +24,7 @@ into [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3), [MultiLine ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** a FeatureCollection of corresponding type to input - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** a FeatureCollection of corresponding type to input ### Examples @@ -53,7 +55,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/concave.mdx b/docs/api/concave.mdx index 51cb1a71..c89154c7 100644 --- a/docs/api/concave.mdx +++ b/docs/api/concave.mdx @@ -4,8 +4,13 @@ title: concave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a concave hull Polygon or MultiPolygon. @@ -16,16 +21,13 @@ Internally, this uses [turf-tin](https://github.com/Turfjs/turf-tin) to generate | Name | Type | Description | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.maxEdge? | **number** | the length (in 'units') of an edge necessary for part of the hull to become concave. _(default Infinity)_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.maxEdge? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the length (in 'units') of an edge necessary for part of the hull to become concave. _(default Infinity)_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | ### Returns -
    - **[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)\> \| null** a concave hull (null value is returned if unable to compute hull) - -
+**[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)\> \| null** a concave hull (null value is returned if unable to compute hull) ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/constants/K_TABLE.mdx b/docs/api/constants/K_TABLE.mdx new file mode 100644 index 00000000..d960fec0 --- /dev/null +++ b/docs/api/constants/K_TABLE.mdx @@ -0,0 +1,30 @@ +--- +title: K_TABLE +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +the confidence level + +### Value + +object \{ + +| Name | Type | Description | +| ---- | ----------------------------------------------------------------------------------------------- | ----------- | +| 20 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.07275 | +| 15 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.13795 | +| 10 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.22385 | +| 5 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.3581 | +| 2 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.51743 | +| 1 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1.62762 | + +\} diff --git a/docs/api/constants/areaFactors.mdx b/docs/api/constants/areaFactors.mdx new file mode 100644 index 00000000..1aa73d6b --- /dev/null +++ b/docs/api/constants/areaFactors.mdx @@ -0,0 +1,19 @@ +--- +title: areaFactors +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Area of measurement factors based on 1 square meter. + +### Value + +Record\<[AreaUnits](docs/api/types/AreaUnits.mdx), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\> diff --git a/docs/api/constants/earthRadius.mdx b/docs/api/constants/earthRadius.mdx new file mode 100644 index 00000000..c1922bc1 --- /dev/null +++ b/docs/api/constants/earthRadius.mdx @@ -0,0 +1,19 @@ +--- +title: earthRadius +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +The Earth radius in kilometers. Used by Turf modules that model the Earth as a sphere. The [mean radius](https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius) was selected because it is [recommended ](https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended) by the Haversine formula (used by turf/distance) to reduce error. + +### Value + +[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) diff --git a/docs/api/constants/factors.mdx b/docs/api/constants/factors.mdx new file mode 100644 index 00000000..55f6a6c0 --- /dev/null +++ b/docs/api/constants/factors.mdx @@ -0,0 +1,21 @@ +--- +title: factors +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Unit of measurement factors based on earthRadius. + +Keys are the name of the unit, values are the number of that unit in a single radian + +### Value + +Record\<[Units](docs/api/types/Units.mdx), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\> diff --git a/docs/api/containsNumber.mdx b/docs/api/containsNumber.mdx index 96efae80..225d975f 100644 --- a/docs/api/containsNumber.mdx +++ b/docs/api/containsNumber.mdx @@ -4,24 +4,26 @@ title: containsNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Checks if coordinates contains a number ### Parameters -| Name | Type | Description | -| ----------- | ---------------- | ------------------- | -| coordinates | **Array\** | GeoJSON Coordinates | +| Name | Type | Description | +| ----------- | ---------------------------------------------------------------------------------------------------- | ------------------- | +| coordinates | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** | GeoJSON Coordinates | ### Returns -
    - **boolean** true if Array contains a number - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if Array contains a number ### Installation diff --git a/docs/api/convertArea.mdx b/docs/api/convertArea.mdx index d4417d7e..5613601d 100644 --- a/docs/api/convertArea.mdx +++ b/docs/api/convertArea.mdx @@ -4,8 +4,13 @@ title: convertArea import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a area to the requested unit. @@ -13,18 +18,15 @@ Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, a ### Parameters -| Name | Type | Description | -| -------------------- | ---------- | -------------------------------------- | -| area | **number** | to be converted | -| originalUnit? | **Units** | of the distance _(default "meters")_ | -| finalUnit? | **Units** | returned unit _(default "kilometers")_ | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------- | +| area | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | to be converted | +| originalUnit? | **[AreaUnits](docs/api/types/AreaUnits.mdx)** | of the distance _(default "meters")_ | +| finalUnit? | **[AreaUnits](docs/api/types/AreaUnits.mdx)** | returned unit _(default "kilometers")_ | ### Returns -
    - **number** the converted area - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the converted area ### Installation diff --git a/docs/api/convertLength.mdx b/docs/api/convertLength.mdx index bbe82674..dc267282 100644 --- a/docs/api/convertLength.mdx +++ b/docs/api/convertLength.mdx @@ -4,8 +4,13 @@ title: convertLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a length to the requested unit. @@ -13,18 +18,15 @@ Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, ce ### Parameters -| Name | Type | Description | -| -------------------- | ---------- | -------------------------------------- | -| length | **number** | to be converted | -| originalUnit? | **Units** | of the length _(default "kilometers")_ | -| finalUnit? | **Units** | returned unit _(default "kilometers")_ | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------- | +| length | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | to be converted | +| originalUnit? | **[Units](docs/api/types/Units.mdx)** | of the length _(default "kilometers")_ | +| finalUnit? | **[Units](docs/api/types/Units.mdx)** | returned unit _(default "kilometers")_ | ### Returns -
    - **number** the converted length - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the converted length ### Installation diff --git a/docs/api/convex.mdx b/docs/api/convex.mdx index f83b0785..929763aa 100644 --- a/docs/api/convex.mdx +++ b/docs/api/convex.mdx @@ -4,8 +4,13 @@ title: convex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a convex hull [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). @@ -16,19 +21,16 @@ the [convex-hull](https://github.com/mikolalysenko/convex-hull) module that impl ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input Feature or FeatureCollection | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.concavity? | **number** | 1 - thin shape. Infinity - convex hull. _(default Infinity)_ | -| options.properties? | **Object** | Translate Properties to Feature _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input Feature or FeatureCollection | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.concavity? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | 1 - thin shape. Infinity - convex hull. _(default Infinity)_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to Feature _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a convex hull - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a convex hull ### Examples @@ -67,7 +69,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/coordAll.mdx b/docs/api/coordAll.mdx index 0751ff73..abdea3ad 100644 --- a/docs/api/coordAll.mdx +++ b/docs/api/coordAll.mdx @@ -4,24 +4,26 @@ title: coordAll import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get all coordinates from any GeoJSON object. ### Parameters -| Name | Type | Description | -| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | +| Name | Type | Description | +| ------- | ----------------------------------------------- | ------------------ | +| geojson | **[AllGeoJSON](docs/api/types/AllGeoJSON.mdx)** | any GeoJSON object | ### Returns -
    - **Array\\>** coordinate position array - -
+**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>\>** coordinate position array ### Examples diff --git a/docs/api/coordEach.mdx b/docs/api/coordEach.mdx index 0e5c1fe5..7d5eaacf 100644 --- a/docs/api/coordEach.mdx +++ b/docs/api/coordEach.mdx @@ -4,23 +4,28 @@ title: coordEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over coordinates in any GeoJSON object, similar to Array.forEach() ### Parameters -| Name | Type | Description | -| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex) | -| excludeWrapCoord? | **boolean** | whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration. _(default false)_ | +| Name | Type | Description | +| ------------------------ | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| geojson | **[AllGeoJSON](docs/api/types/AllGeoJSON.mdx)** | any GeoJSON object | +| callback | **[coordEachCallback](docs/api/types/coordEachCallback.mdx)** | a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex) | +| excludeWrapCoord? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration. _(default false)_ | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/coordReduce.mdx b/docs/api/coordReduce.mdx index b59d720e..aa115f7d 100644 --- a/docs/api/coordReduce.mdx +++ b/docs/api/coordReduce.mdx @@ -4,27 +4,29 @@ title: coordReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce coordinates in any GeoJSON object, similar to Array.reduce() ### Parameters -| Name | Type | Description | -| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | any GeoJSON object | -| callback | **Function** | a method that takes (previousValue, currentCoord, coordIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | -| excludeWrapCoord? | **boolean** | whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration. _(default false)_ | +| Name | Type | Description | +| ------------------------ | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| geojson | **[AllGeoJSON](docs/api/types/AllGeoJSON.mdx)** | any GeoJSON object | +| callback | **[coordReduceCallback](docs/api/types/coordReduceCallback.mdx)** | a method that takes (previousValue, currentCoord, coordIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | +| excludeWrapCoord? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration. _(default false)_ | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/degreesToRadians.mdx b/docs/api/degreesToRadians.mdx index 76debaaa..711a5dca 100644 --- a/docs/api/degreesToRadians.mdx +++ b/docs/api/degreesToRadians.mdx @@ -4,24 +4,26 @@ title: degreesToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in degrees to radians ### Parameters -| Name | Type | Description | -| ------- | ---------- | ------------------------------- | -| degrees | **number** | angle between 0 and 360 degrees | +| Name | Type | Description | +| ------- | ----------------------------------------------------------------------------------------------- | ------------------------------- | +| degrees | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle between 0 and 360 degrees | ### Returns -
    - **number** angle in radians - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** angle in radians ### Installation diff --git a/docs/api/destination.mdx b/docs/api/destination.mdx index 6a5b03a8..9e8560d8 100644 --- a/docs/api/destination.mdx +++ b/docs/api/destination.mdx @@ -4,8 +4,13 @@ title: destination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the location of a destination point given a distance in @@ -14,21 +19,18 @@ This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula ### Parameters -| Name | Type | Description | -| -------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- | -| origin | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | starting point | -| distance | **number** | distance from the origin point | -| bearing | **number** | ranging from -180 to 180 | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | -| options.properties? | **Object** | Translate properties to Point _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| origin | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | starting point | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance from the origin point | +| bearing | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | ranging from -180 to 180 | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate properties to Point _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** destination point - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** destination point ### Examples @@ -61,7 +63,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/difference.mdx b/docs/api/difference.mdx index a073e852..788b06ad 100644 --- a/docs/api/difference.mdx +++ b/docs/api/difference.mdx @@ -4,8 +4,13 @@ title: difference import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the difference between multiple [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) by clipping the subsequent polygon from the first. @@ -18,10 +23,7 @@ Finds the difference between multiple [polygons](https://tools.ietf.org/html/rfc ### Returns -
    - **[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)\> \| null** a Polygon or MultiPolygon feature showing the area of `polygon1` excluding the area of `polygon2` (if empty returns `null`) - -
+**[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)\> \| null** a Polygon or MultiPolygon feature showing the area of `polygon1` excluding the area of `polygon2` (if empty returns `null`) ### Examples @@ -106,7 +108,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/directionalMean.mdx b/docs/api/directionalMean.mdx index 21092328..300331dd 100644 --- a/docs/api/directionalMean.mdx +++ b/docs/api/directionalMean.mdx @@ -4,8 +4,13 @@ title: directionalMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description This module calculate the average angle of a set of lines, measuring the trend of it. @@ -17,16 +22,13 @@ It can handle segments of line or the whole line. | Name | Type | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | lines | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | | -| options? | **object** | _(default \{\})_ | -| options.planar? | **boolean** | whether the spatial reference system is projected or geographical. _(default true)_ | -| options.segment? | **boolean** | whether treat a LineString as a whole or a set of segments. _(default false)_ | +| options? | **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | _(default \{\})_ | +| options.planar? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether the spatial reference system is projected or geographical. _(default true)_ | +| options.segment? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether treat a LineString as a whole or a set of segments. _(default false)_ | ### Returns -
    - **DirectionalMeanLine** Directional Mean Line - -
+**[DirectionalMeanLine](docs/api/types/DirectionalMeanLine.mdx)** Directional Mean Line ### Examples diff --git a/docs/api/dissolve.mdx b/docs/api/dissolve.mdx index 7c1be641..d0166624 100644 --- a/docs/api/dissolve.mdx +++ b/docs/api/dissolve.mdx @@ -4,27 +4,30 @@ title: dissolve import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Dissolves a FeatureCollection of [polygon](polygon) features, filtered by an optional property name:value. -Note that [multipolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) features within the collection are not supported +Dissolves a FeatureCollection of [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) features, filtered by an optional property name:value. +Note that [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) features within the collection are not supported ### Parameters | Name | Type | Description | | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.propertyName? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | features with the same `propertyName` value will be dissolved. | | featureCollection | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | input feature collection to be dissolved | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.propertyName? | **string** | features with the same `propertyName` value will be dissolved. | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a FeatureCollection containing the dissolved polygons - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a FeatureCollection containing the dissolved polygons ### Examples @@ -123,7 +126,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/distance.mdx b/docs/api/distance.mdx index 6f22f019..7ce1c5a7 100644 --- a/docs/api/distance.mdx +++ b/docs/api/distance.mdx @@ -4,28 +4,30 @@ title: distance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Calculates the distance between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, miles, or kilometers. +Calculates the distance between two [coordinates](https://tools.ietf.org/html/rfc7946#section-3.1.1) in degrees, radians, miles, or kilometers. This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature. ### Parameters -| Name | Type | Description | -| --------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| from | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1) \| [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)** | origin point or coordinate | -| to | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1) \| [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)** | destination point or coordinate | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| Name | Type | Description | +| --------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| from | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | origin coordinate | +| to | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | destination coordinate | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | ### Returns -
    - **number** distance between the two points - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance between the two coordinates ### Examples @@ -56,7 +58,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/distanceWeight.mdx b/docs/api/distanceWeight.mdx index 1764cfd3..c0971ed2 100644 --- a/docs/api/distanceWeight.mdx +++ b/docs/api/distanceWeight.mdx @@ -4,28 +4,30 @@ title: distanceWeight import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ### Parameters -| Name | Type | Description | -| ------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | FeatureCollection. | -| options? | **Object** | option object. | -| options.threshold? | **number** | If the distance between neighbor and target features is greater than threshold, the weight of that neighbor is 0. _(default 10000)_ | -| options.p? | **number** | Minkowski p-norm distance parameter. 1: Manhattan distance. 2: Euclidean distance. 1=\? | **boolean** | If true, weight=1 if d \<= threshold otherwise weight=0. If false, weight=Math.pow(d, alpha). _(default false)_ | -| options.alpha? | **number** | distance decay parameter. A big value means the weight decay quickly as distance increases. _(default -1)_ | -| options.standardization? | **boolean** | row standardization. _(default false)_ | +| Name | Type | Description | +| ------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | FeatureCollection. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | option object. | +| options.threshold? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | If the distance between neighbor and target features is greater than threshold, the weight of that neighbor is 0. _(default 10000)_ | +| options.p? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Minkowski p-norm distance parameter. 1: Manhattan distance. 2: Euclidean distance. 1=\? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | If true, weight=1 if d \<= threshold otherwise weight=0. If false, weight=Math.pow(d, alpha). _(default false)_ | +| options.alpha? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance decay parameter. A big value means the weight decay quickly as distance increases. _(default -1)_ | +| options.standardization? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | row standardization. _(default false)_ | ### Returns -
    - **Array\\>** distance weight matrix. - -
+**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>\>** distance weight matrix. ### Examples diff --git a/docs/api/ellipse.mdx b/docs/api/ellipse.mdx index 9f47e136..c9aef5d7 100644 --- a/docs/api/ellipse.mdx +++ b/docs/api/ellipse.mdx @@ -4,32 +4,34 @@ title: ellipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision. ### Parameters -| Name | Type | Description | -| -------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------- | -| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | -| xSemiAxis | **number** | semi (major) axis of the ellipse along the x-axis | -| ySemiAxis | **number** | semi (minor) axis of the ellipse along the y-axis | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.angle? | **number** | angle of rotation in decimal degrees, positive clockwise _(default 0)_ | -| options.pivot? | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point around which any rotation will be performed _(default center)_ | -| options.steps? | **number** | number of steps _(default 64)_ | -| options.units? | **string** | unit of measurement for axes _(default 'kilometers')_ | -| options.properties? | **Object** | properties _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | +| xSemiAxis | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | semi (major) axis of the ellipse along the x-axis | +| ySemiAxis | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | semi (minor) axis of the ellipse along the y-axis | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.angle? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle of rotation in decimal degrees, positive clockwise _(default 0)_ | +| options.pivot? | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point around which any rotation will be performed _(default center)_ | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps _(default 64)_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | unit of measurement for axes _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | properties _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** ellipse polygon - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** ellipse polygon ### Examples @@ -56,7 +58,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/envelope.mdx b/docs/api/envelope.mdx index 38946c08..fbd2421f 100644 --- a/docs/api/envelope.mdx +++ b/docs/api/envelope.mdx @@ -4,8 +4,13 @@ title: envelope import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any number of features and returns a rectangular [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) that encompasses all vertices. @@ -18,10 +23,7 @@ Takes any number of features and returns a rectangular [Polygon](https://tools.i ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a rectangular Polygon feature that encompasses all vertices - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a rectangular Polygon feature that encompasses all vertices ### Examples @@ -54,7 +56,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/explode.mdx b/docs/api/explode.mdx index d561d368..0efa6a70 100644 --- a/docs/api/explode.mdx +++ b/docs/api/explode.mdx @@ -4,8 +4,13 @@ title: explode import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a feature or set of features and returns all positions as [points](https://tools.ietf.org/html/rfc7946#section-3.1.2). @@ -18,10 +23,7 @@ Takes a feature or set of features and returns all positions as [points](https:/ ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** points representing the exploded input features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** points representing the exploded input features ### Examples @@ -64,7 +66,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/feature.mdx b/docs/api/feature.mdx index 9e5e29d3..d5de238d 100644 --- a/docs/api/feature.mdx +++ b/docs/api/feature.mdx @@ -4,28 +4,31 @@ title: feature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Wraps a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) in a GeoJSON [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). ### Parameters -| Name | Type | Description | -| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------- | -| geometry | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | input geometry | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| geom | **G \| null** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | +| geometry | **[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1)** | input geometry | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** a GeoJSON Feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a GeoJSON Feature ### Examples diff --git a/docs/api/featureCollection.mdx b/docs/api/featureCollection.mdx index 88aa5cd9..b1bd7bfa 100644 --- a/docs/api/featureCollection.mdx +++ b/docs/api/featureCollection.mdx @@ -4,27 +4,29 @@ title: featureCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more [Features](https://tools.ietf.org/html/rfc7946#section-3.2) and creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3). ### Parameters -| Name | Type | Description | -| -------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| features | **Array\<[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\>** | input features | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | +| features | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>\>** | input features | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** FeatureCollection of Features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** FeatureCollection of Features ### Examples diff --git a/docs/api/featureEach.mdx b/docs/api/featureEach.mdx index f5dcd8a8..d263ea9b 100644 --- a/docs/api/featureEach.mdx +++ b/docs/api/featureEach.mdx @@ -4,8 +4,13 @@ title: featureEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over features in any GeoJSON object, similar to @@ -13,14 +18,14 @@ Array.forEach. ### Parameters -| Name | Type | Description | -| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (currentFeature, featureIndex) | +| Name | Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[featureEachCallback](docs/api/types/featureEachCallback.mdx)** | a method that takes (currentFeature, featureIndex) | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/featureOf.mdx b/docs/api/featureOf.mdx index c4bbf3d9..3b886735 100644 --- a/docs/api/featureOf.mdx +++ b/docs/api/featureOf.mdx @@ -4,8 +4,13 @@ title: featureOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) inputs for Turf. @@ -13,14 +18,16 @@ Internally this uses [geojsonType](geojsonType) to judge geometry types. ### Parameters -| Name | Type | Description | -| ------- | -------------------------------------------------------------- | ---------------------------------------- | -| feature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | a feature with an expected geometry type | -| type | **string** | expected GeoJSON type | -| name | **string** | name of calling function | +| Name | Type | Description | +| ------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------- | +| feature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | a feature with an expected geometry type | +| type | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | expected GeoJSON type | +| name | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | name of calling function | ### Returns +**void** + ### Installation ```javascript diff --git a/docs/api/featureReduce.mdx b/docs/api/featureReduce.mdx index 8280888d..89e8ba58 100644 --- a/docs/api/featureReduce.mdx +++ b/docs/api/featureReduce.mdx @@ -4,26 +4,28 @@ title: featureReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). ### Parameters -| Name | Type | Description | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (previousValue, currentFeature, featureIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[featureReduceCallback](docs/api/types/featureReduceCallback.mdx)** | a method that takes (previousValue, currentFeature, featureIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/findPoint.mdx b/docs/api/findPoint.mdx index 79afbf8b..064bc028 100644 --- a/docs/api/findPoint.mdx +++ b/docs/api/findPoint.mdx @@ -4,8 +4,13 @@ title: findPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular Point from a GeoJSON using `@turf/meta` indexes. @@ -17,21 +22,18 @@ Negative indexes are permitted. | Name | Type | Description | | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | Any GeoJSON Feature or Geometry | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.featureIndex? | **number** | Feature Index _(default 0)_ | -| options.multiFeatureIndex? | **number** | Multi-Feature Index _(default 0)_ | -| options.geometryIndex? | **number** | Geometry Index _(default 0)_ | -| options.coordIndex? | **number** | Coord Index _(default 0)_ | -| options.properties? | **Object** | Translate Properties to output Point _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.featureIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Feature Index _(default 0)_ | +| options.multiFeatureIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Multi-Feature Index _(default 0)_ | +| options.geometryIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Geometry Index _(default 0)_ | +| options.coordIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Coord Index _(default 0)_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to output Point _(default \{\})_ | | options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Translate BBox to output Point _(default \{\})_ | -| options.id? | **number \| string** | Translate Id to output Point _(default \{\})_ | +| options.id? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | Translate Id to output Point _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** 2-vertex GeoJSON Feature Point - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** 2-vertex GeoJSON Feature Point ### Examples diff --git a/docs/api/findSegment.mdx b/docs/api/findSegment.mdx index 30ef8dfb..9339d476 100644 --- a/docs/api/findSegment.mdx +++ b/docs/api/findSegment.mdx @@ -4,8 +4,13 @@ title: findSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes. @@ -18,21 +23,18 @@ Point & MultiPoint will always return null. | Name | Type | Description | | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | Any GeoJSON Feature or Geometry | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.featureIndex? | **number** | Feature Index _(default 0)_ | -| options.multiFeatureIndex? | **number** | Multi-Feature Index _(default 0)_ | -| options.geometryIndex? | **number** | Geometry Index _(default 0)_ | -| options.segmentIndex? | **number** | Segment Index _(default 0)_ | -| options.properties? | **Object** | Translate Properties to output LineString _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.featureIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Feature Index _(default 0)_ | +| options.multiFeatureIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Multi-Feature Index _(default 0)_ | +| options.geometryIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Geometry Index _(default 0)_ | +| options.segmentIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Segment Index _(default 0)_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to output LineString _(default \{\})_ | | options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Translate BBox to output LineString _(default \{\})_ | -| options.id? | **number \| string** | Translate Id to output LineString _(default \{\})_ | +| options.id? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | Translate Id to output LineString _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** 2-vertex GeoJSON Feature LineString - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** 2-vertex GeoJSON Feature LineString ### Examples diff --git a/docs/api/flatten.mdx b/docs/api/flatten.mdx index b65a6600..835ccb4e 100644 --- a/docs/api/flatten.mdx +++ b/docs/api/flatten.mdx @@ -4,8 +4,13 @@ title: flatten import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Flattens any [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) to a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten). @@ -18,10 +23,7 @@ Flattens any [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) to a [Feat ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** all Multi-Geometries are flattened into single Features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** all Multi-Geometries are flattened into single Features ### Examples @@ -98,7 +100,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/flattenEach.mdx b/docs/api/flattenEach.mdx index 1a2bb5a4..aa5d433d 100644 --- a/docs/api/flattenEach.mdx +++ b/docs/api/flattenEach.mdx @@ -4,8 +4,13 @@ title: flattenEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over flattened features in any GeoJSON object, similar to @@ -13,13 +18,15 @@ Array.forEach. ### Parameters -| Name | Type | Description | -| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (currentFeature, featureIndex, multiFeatureIndex) | +| Name | Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[flattenEachCallback](docs/api/types/flattenEachCallback.mdx)** | a method that takes (currentFeature, featureIndex, multiFeatureIndex) | ### Returns +**void** + ### Examples ```javascript diff --git a/docs/api/flattenReduce.mdx b/docs/api/flattenReduce.mdx index 4f1d80dd..cdcfad57 100644 --- a/docs/api/flattenReduce.mdx +++ b/docs/api/flattenReduce.mdx @@ -4,26 +4,28 @@ title: flattenReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce flattened features in any GeoJSON object, similar to Array.reduce(). ### Parameters -| Name | Type | Description | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[flattenReduceCallback](docs/api/types/flattenReduceCallback.mdx)** | a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/flip.mdx b/docs/api/flip.mdx index 8dfb19dc..09d7ff59 100644 --- a/docs/api/flip.mdx +++ b/docs/api/flip.mdx @@ -4,26 +4,28 @@ title: flip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`. ### Parameters -| Name | Type | Description | -| ---------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input features | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input features | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** a feature or set of features of the same type as `input` with flipped coordinates - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** a feature or set of features of the same type as `input` with flipped coordinates ### Examples @@ -48,7 +50,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/geojsonType.mdx b/docs/api/geojsonType.mdx index d342fa07..82874cda 100644 --- a/docs/api/geojsonType.mdx +++ b/docs/api/geojsonType.mdx @@ -4,22 +4,29 @@ title: geojsonType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of GeoJSON objects for Turf. ### Parameters -| Name | Type | Description | -| ----- | ------------------------------------------------------------ | ------------------------ | -| value | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON object | -| type | **string** | expected GeoJSON type | -| name | **string** | name of calling function | +| Name | Type | Description | +| ----- | ----------------------------------------------------------------------------------------------- | ------------------------ | +| value | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON object | +| type | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | expected GeoJSON type | +| name | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | name of calling function | ### Returns +**void** + ### Installation ```javascript diff --git a/docs/api/geomEach.mdx b/docs/api/geomEach.mdx index 9a073c2d..481affbd 100644 --- a/docs/api/geomEach.mdx +++ b/docs/api/geomEach.mdx @@ -4,22 +4,27 @@ title: geomEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over each geometry in any GeoJSON object, similar to Array.forEach() ### Parameters -| Name | Type | Description | -| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) | +| Name | Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[geomEachCallback](docs/api/types/geomEachCallback.mdx)** | a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/geomReduce.mdx b/docs/api/geomReduce.mdx index 101034a8..ea08a32b 100644 --- a/docs/api/geomReduce.mdx +++ b/docs/api/geomReduce.mdx @@ -4,26 +4,28 @@ title: geomReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce geometry in any GeoJSON object, similar to Array.reduce(). ### Parameters -| Name | Type | Description | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | -| callback | **Function** | a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** | any GeoJSON object | +| callback | **[geomReduceCallback](docs/api/types/geomReduceCallback.mdx)** | a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/geometry.mdx b/docs/api/geometry.mdx index cafae02a..bcdcfebd 100644 --- a/docs/api/geometry.mdx +++ b/docs/api/geometry.mdx @@ -4,8 +4,13 @@ title: geometry import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) from a Geometry string type & coordinates. @@ -13,18 +18,16 @@ For GeometryCollection type use `helpers.geometryCollection` ### Parameters -| Name | Type | Description | -| --------------- | ---------------- | ------------------------------------ | -| type | **string** | Geometry Type | -| coordinates | **Array\** | Coordinates | -| options? | **Object** | Optional Parameters _(default \{\})_ | +| Name | Type | Description | +| --------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| type | **"Point" \| "LineString" \| "Polygon" \| "MultiPoint" \| "MultiLineString" \| "MultiPolygon"** | Geometry Type | +| coordinates | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** | Coordinates | +| \_options | **Record\<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), never\>** | _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | ### Returns -
    - **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** a GeoJSON Geometry - -
+**[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** a GeoJSON Geometry ### Examples diff --git a/docs/api/geometryCollection.mdx b/docs/api/geometryCollection.mdx index 9adfcf6b..9450a898 100644 --- a/docs/api/geometryCollection.mdx +++ b/docs/api/geometryCollection.mdx @@ -4,29 +4,31 @@ title: geometryCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\> based on a +Creates a Feature\ based on a coordinate array. Properties can be added optionally. ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- | -| geometries | **Array\<[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)\>** | an array of GeoJSON Geometries | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| geometries | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | an array of GeoJSON Geometries | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\>** a GeoJSON GeometryCollection Feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a GeoJSON GeometryCollection Feature ### Examples diff --git a/docs/api/getCluster.mdx b/docs/api/getCluster.mdx index deef155c..c610e17c 100644 --- a/docs/api/getCluster.mdx +++ b/docs/api/getCluster.mdx @@ -4,8 +4,13 @@ title: getCluster import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Cluster @@ -19,10 +24,7 @@ Get Cluster ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** Single Cluster filtered by GeoJSON Properties - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** Single Cluster filtered by GeoJSON Properties ### Examples diff --git a/docs/api/getCoord.mdx b/docs/api/getCoord.mdx index 07a41450..9429d01d 100644 --- a/docs/api/getCoord.mdx +++ b/docs/api/getCoord.mdx @@ -4,24 +4,26 @@ title: getCoord import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap a coordinate from a Point Feature, Geometry or a single coordinate. ### Parameters -| Name | Type | Description | -| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| coord | **Array\ \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | GeoJSON Point or an Array of numbers | +| Name | Type | Description | +| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| coord | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\> \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | GeoJSON Point or an Array of numbers | ### Returns -
    - **Array\** coordinates - -
+**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** coordinates ### Examples diff --git a/docs/api/getCoords.mdx b/docs/api/getCoords.mdx index 6c6bf396..c9784f27 100644 --- a/docs/api/getCoords.mdx +++ b/docs/api/getCoords.mdx @@ -4,24 +4,26 @@ title: getCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap coordinates from a Feature, Geometry Object or an Array ### Parameters -| Name | Type | Description | -| ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| coords | **Array\ \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | Feature, Geometry Object or an Array | +| Name | Type | Description | +| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| coords | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\ \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | Feature, Geometry Object or an Array | ### Returns -
    - **Array\** coordinates - -
+**[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** coordinates ### Examples diff --git a/docs/api/getGeom.mdx b/docs/api/getGeom.mdx index c17f8e1d..9bc5390c 100644 --- a/docs/api/getGeom.mdx +++ b/docs/api/getGeom.mdx @@ -4,8 +4,13 @@ title: getGeom import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Geometry from Feature or Geometry Object @@ -18,10 +23,7 @@ Get Geometry from Feature or Geometry Object ### Returns -
    - **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| null** GeoJSON Geometry Object - -
+**[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| null** GeoJSON Geometry Object ### Examples diff --git a/docs/api/getType.mdx b/docs/api/getType.mdx index 1efae6ae..18432257 100644 --- a/docs/api/getType.mdx +++ b/docs/api/getType.mdx @@ -4,25 +4,28 @@ title: getType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get GeoJSON object's type, Geometry type is prioritize. ### Parameters -| Name | Type | Description | -| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON object | -| name? | **string** | name of the variable to display in error message (unused) _(default "geojson")_ | +| Name | Type | Description | +| -------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON object | +| \_name? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | | +| name? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | name of the variable to display in error message (unused) _(default "geojson")_ | ### Returns -
    - **string** GeoJSON type - -
+**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** GeoJSON type ### Examples diff --git a/docs/api/greatCircle.mdx b/docs/api/greatCircle.mdx index d5405bb8..95f76f64 100644 --- a/docs/api/greatCircle.mdx +++ b/docs/api/greatCircle.mdx @@ -4,8 +4,13 @@ title: greatCircle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculate great circles routes as [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5). @@ -14,21 +19,18 @@ be split into a `MultiLineString`. ### Parameters -| Name | Type | Description | -| -------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| start | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | source point feature | -| end | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | destination point feature | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | line feature properties _(default \{\})_ | -| options.npoints? | **number** | number of points _(default 100)_ | -| options.offset? | **number** | offset controls the likelyhood that lines will be split which cross the dateline. The higher the number the more likely. _(default 10)_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| start | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | source point feature | +| end | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | destination point feature | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | line feature properties _(default \{\})_ | +| options.npoints? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of points _(default 100)_ | +| options.offset? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | offset controls the likelyhood that lines will be split which cross the dateline. The higher the number the more likely. _(default 10)_ | ### Returns -
    - **[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)\>** great circle line 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)\>** great circle line feature ### Examples @@ -59,7 +61,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/hexGrid.mdx b/docs/api/hexGrid.mdx index 7e678d9e..08cda6f0 100644 --- a/docs/api/hexGrid.mdx +++ b/docs/api/hexGrid.mdx @@ -4,8 +4,13 @@ title: hexGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and the diameter of the cell and returns a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of flat-topped @@ -17,19 +22,16 @@ described in [Hexagonal Grids](http://www.redblobgames.com/grids/hexagons/). | Name | Type | Description | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent in [minX, minY, maxX, maxY] order | -| cellSide | **number** | length of the side of the the hexagons or triangles, in units. It will also coincide with the radius of the circumcircle of the hexagons. | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | used in calculating cell size, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.properties? | **Object** | passed to each hexagon or triangle of the grid _(default \{\})_ | +| cellSide | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | length of the side of the the hexagons or triangles, in units. It will also coincide with the radius of the circumcircle of the hexagons. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | used in calculating cell size, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | passed to each hexagon or triangle of the grid _(default \{\})_ | | options.mask? | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | -| options.triangles? | **boolean** | whether to return as triangles instead of hexagons _(default false)_ | +| options.triangles? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether to return as triangles instead of hexagons _(default false)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a hexagonal grid - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a hexagonal grid ### Examples @@ -58,7 +60,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/interpolate.mdx b/docs/api/interpolate.mdx index 04694454..5ffa3b08 100644 --- a/docs/api/interpolate.mdx +++ b/docs/api/interpolate.mdx @@ -4,8 +4,13 @@ title: interpolate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting). @@ -15,19 +20,16 @@ Takes a set of points and estimates their 'property' values on a grid using the | Name | Type | Description | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | with known value | -| cellSize | **number** | the distance across each grid point | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.gridType? | **string** | defines the output format based on a Grid Type (options: 'square' \| 'point' \| 'hex' \| 'triangle') _(default 'square')_ | -| options.property? | **string** | the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. _(default 'elevation')_ | -| options.units? | **string** | used in calculating cellSize, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.weight? | **number** | exponent regulating the distance-decay weighting _(default 1)_ | +| cellSize | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the distance across each grid point | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.gridType? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | defines the output format based on a Grid Type (options: 'square' \| 'point' \| 'hex' \| 'triangle') _(default 'square')_ | +| options.property? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. _(default 'elevation')_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | used in calculating cellSize, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| options.weight? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | exponent regulating the distance-decay weighting _(default 1)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** grid of points or polygons with interpolated 'property' - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** grid of points or polygons with interpolated 'property' ### Examples @@ -62,7 +64,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/intersect.mdx b/docs/api/intersect.mdx index 292c7ce1..aa08d3d5 100644 --- a/docs/api/intersect.mdx +++ b/docs/api/intersect.mdx @@ -4,8 +4,13 @@ title: intersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [multi-polygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) geometries and @@ -16,17 +21,14 @@ finds their polygonal intersection. If they don't intersect, returns null. | 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)\>** | the features to intersect | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.properties? | **Object** | Translate GeoJSON Properties to Feature _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate GeoJSON Properties to Feature _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| null** returns a feature representing the area they share (either a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or +**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| null** returns a feature representing the area they share (either a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)). If they do not share any area, returns `null`. -
- ### Examples ```javascript @@ -92,7 +94,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/isNumber.mdx b/docs/api/isNumber.mdx index 95bb4d13..9d7eb265 100644 --- a/docs/api/isNumber.mdx +++ b/docs/api/isNumber.mdx @@ -4,24 +4,26 @@ title: isNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isNumber ### Parameters -| Name | Type | Description | -| ---- | ------ | ------------------ | -| num | **\*** | Number to validate | +| Name | Type | Description | +| ---- | ------- | ------------------ | +| num | **any** | Number to validate | ### Returns -
    - **boolean** true/false - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false ### Examples diff --git a/docs/api/isObject.mdx b/docs/api/isObject.mdx index 5b98f8ed..1f397026 100644 --- a/docs/api/isObject.mdx +++ b/docs/api/isObject.mdx @@ -4,24 +4,26 @@ title: isObject import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isObject ### Parameters -| Name | Type | Description | -| ----- | ------ | -------------------- | -| input | **\*** | variable to validate | +| Name | Type | Description | +| ----- | ------- | -------------------- | +| input | **any** | variable to validate | ### Returns -
    - **boolean** true/false, including false for Arrays and Functions - -
+**[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true/false, including false for Arrays and Functions ### Examples diff --git a/docs/api/isobands.mdx b/docs/api/isobands.mdx index 2d66b510..cad37b12 100644 --- a/docs/api/isobands.mdx +++ b/docs/api/isobands.mdx @@ -4,8 +4,13 @@ title: isobands import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a square or rectangular grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of @@ -13,21 +18,18 @@ value breaks and generates filled contour isobands. ### Parameters -| Name | Type | Description | -| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| pointGrid | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points - must be square or rectangular | -| breaks | **Array\** | where to draw contours | -| options? | **Object** | options on output _(default \{\})_ | -| options.zProperty? | **string** | the property name in `points` from which z-values will be pulled _(default 'elevation')_ | -| options.commonProperties? | **Object** | GeoJSON properties passed to ALL isobands _(default \{\})_ | -| options.breaksProperties? | **Array\** | GeoJSON properties passed, in order, to the correspondent isoband (order defined by breaks) _(default [])_ | +| Name | Type | Description | +| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| pointGrid | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points - must be square or rectangular | +| breaks | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | where to draw contours | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | options on output _(default \{\})_ | +| options.zProperty? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name in `points` from which z-values will be pulled _(default 'elevation')_ | +| options.commonProperties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | GeoJSON properties passed to ALL isobands _(default \{\})_ | +| options.breaksProperties? | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\>** | GeoJSON properties passed, in order, to the correspondent isoband (order defined by breaks) _(default [])_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** a FeatureCollection of [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) features representing isobands - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** a FeatureCollection of [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) features representing isobands ### Installation diff --git a/docs/api/isolines.mdx b/docs/api/isolines.mdx index edfd771b..fadfbfd2 100644 --- a/docs/api/isolines.mdx +++ b/docs/api/isolines.mdx @@ -4,8 +4,13 @@ title: isolines import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of @@ -13,21 +18,18 @@ value breaks and generates [isolines](https://en.wikipedia.org/wiki/Contour_line ### Parameters -| Name | Type | Description | -| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| pointGrid | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points | -| breaks | **Array\** | values of `zProperty` where to draw isolines | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.zProperty? | **string** | the property name in `points` from which z-values will be pulled _(default 'elevation')_ | -| options.commonProperties? | **Object** | GeoJSON properties passed to ALL isolines _(default \{\})_ | -| options.breaksProperties? | **Array\** | GeoJSON properties passed, in order, to the correspondent isoline; the breaks array will define the order in which the isolines are created _(default [])_ | +| Name | Type | Description | +| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| pointGrid | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points | +| breaks | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | values of `zProperty` where to draw isolines | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.zProperty? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name in `points` from which z-values will be pulled _(default 'elevation')_ | +| options.commonProperties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | GeoJSON properties passed to ALL isolines _(default \{\})_ | +| options.breaksProperties? | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\>** | GeoJSON properties passed, in order, to the correspondent isoline; the breaks array will define the order in which the isolines are created _(default [])_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\>** a FeatureCollection of [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) features representing isolines - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\>** a FeatureCollection of [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) features representing isolines ### Examples @@ -68,7 +70,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/kinks.mdx b/docs/api/kinks.mdx index c9f4bfe7..068bb55f 100644 --- a/docs/api/kinks.mdx +++ b/docs/api/kinks.mdx @@ -4,8 +4,13 @@ title: kinks import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [linestring](https://tools.ietf.org/html/rfc7946#section-3.1.4), [multi-linestring](https://tools.ietf.org/html/rfc7946#section-3.1.5), @@ -20,10 +25,7 @@ returns [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) at all self- ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** self-intersections - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** self-intersections ### Examples @@ -64,7 +66,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/length.mdx b/docs/api/length.mdx index d99b4342..08e4de51 100644 --- a/docs/api/length.mdx +++ b/docs/api/length.mdx @@ -4,8 +4,13 @@ title: length import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) and measures its length in the specified units, [(Multi)Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)'s distance are ignored. @@ -15,15 +20,12 @@ Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) and measures it | Name | Type | Description | | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | geojson | **[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)\>** | GeoJSON to measure | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default kilometers)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default kilometers)_ | ### Returns -
    - **number** length of GeoJSON - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** length of GeoJSON ### Examples @@ -57,7 +59,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lengthToDegrees.mdx b/docs/api/lengthToDegrees.mdx index d088c5c4..25863b85 100644 --- a/docs/api/lengthToDegrees.mdx +++ b/docs/api/lengthToDegrees.mdx @@ -4,8 +4,13 @@ title: lengthToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees @@ -13,17 +18,14 @@ Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, k ### Parameters -| Name | Type | Description | -| ------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | -| distance | **number** | in real units | -| units? | **string** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | +| Name | Type | Description | +| ------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | in real units | +| units? | **[Units](docs/api/types/Units.mdx)** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | ### Returns -
    - **number** degrees - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** degrees ### Installation diff --git a/docs/api/lengthToRadians.mdx b/docs/api/lengthToRadians.mdx index f0292908..568a84e6 100644 --- a/docs/api/lengthToRadians.mdx +++ b/docs/api/lengthToRadians.mdx @@ -4,8 +4,13 @@ title: lengthToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians @@ -13,17 +18,14 @@ Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, ce ### Parameters -| Name | Type | Description | -| ------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | -| distance | **number** | in real units | -| units? | **string** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | +| Name | Type | Description | +| ------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | in real units | +| units? | **[Units](docs/api/types/Units.mdx)** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | ### Returns -
    - **number** radians - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** radians ### Installation diff --git a/docs/api/lineArc.mdx b/docs/api/lineArc.mdx index eb08ff69..3cf5b9fc 100644 --- a/docs/api/lineArc.mdx +++ b/docs/api/lineArc.mdx @@ -4,8 +4,13 @@ title: lineArc import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; @@ -13,22 +18,19 @@ Creates a circular arc, of a circle of the given radius and center point, betwee ### Parameters -| Name | Type | Description | -| --------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | -| radius | **number** | radius of the circle | -| bearing1 | **number** | angle, in decimal degrees, of the first radius of the arc | -| bearing2 | **number** | angle, in decimal degrees, of the second radius of the arc | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.steps? | **number** | number of steps (straight segments) that will constitute the arc _(default 64)_ | -| options.units? | **string** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | +| Name | Type | Description | +| --------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | +| radius | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | radius of the circle | +| bearing1 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle, in decimal degrees, of the first radius of the arc | +| bearing2 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle, in decimal degrees, of the second radius of the arc | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps (straight segments) that will constitute the arc _(default 64)_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** line arc - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** line arc ### Examples @@ -59,7 +61,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineChunk.mdx b/docs/api/lineChunk.mdx index a6c22dfc..53857be9 100644 --- a/docs/api/lineChunk.mdx +++ b/docs/api/lineChunk.mdx @@ -4,8 +4,13 @@ title: lineChunk import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Divides a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) into chunks of a specified length. @@ -16,17 +21,14 @@ If the line is shorter than the segment length then the original line is returne | Name | Type | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | the lines to split | -| segmentLength | **number** | how long to make each segment | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | units can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.reverse? | **boolean** | reverses coordinates to start the first chunked segment at the end _(default false)_ | +| segmentLength | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | how long to make each segment | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | units can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| options.reverse? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | reverses coordinates to start the first chunked segment at the end _(default false)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** collection of line segments - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** collection of line segments ### Examples @@ -59,7 +61,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineEach.mdx b/docs/api/lineEach.mdx index a8d178c9..dbcc22aa 100644 --- a/docs/api/lineEach.mdx +++ b/docs/api/lineEach.mdx @@ -4,8 +4,13 @@ title: lineEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries, @@ -13,13 +18,15 @@ similar to Array.forEach. ### Parameters -| Name | Type | Description | -| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| geojson | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | object | -| callback | **Function** | a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex) | +| Name | Type | Description | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Lines](docs/api/types/Lines.mdx)\> \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Lines](docs/api/types/Lines.mdx)\> \| [Lines](docs/api/types/Lines.mdx) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\> \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** | object | +| callback | **[lineEachCallback](docs/api/types/lineEachCallback.mdx)** | a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex) | ### Returns +**void** + ### Examples ```javascript diff --git a/docs/api/lineIntersect.mdx b/docs/api/lineIntersect.mdx index 571653d2..f36c54fa 100644 --- a/docs/api/lineIntersect.mdx +++ b/docs/api/lineIntersect.mdx @@ -4,28 +4,30 @@ title: lineIntersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). ### Parameters -| Name | Type | Description | -| --------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | -| line1 | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any LineString or Polygon | -| line2 | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any LineString or Polygon | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.removeDuplicates? | **boolean** | remove duplicate intersections _(default true)_ | -| options.ignoreSelfIntersections? | **boolean** | ignores self-intersections on input features _(default false)_ | +| Name | Type | Description | +| --------------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| line1 | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any LineString or Polygon | +| line2 | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any LineString or Polygon | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.removeDuplicates? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | remove duplicate intersections _(default true)_ | +| options.ignoreSelfIntersections? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | ignores self-intersections on input features _(default false)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** point(s) that intersect both - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** point(s) that intersect both ### Examples @@ -62,7 +64,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineOffset.mdx b/docs/api/lineOffset.mdx index a58b65bc..f97d6860 100644 --- a/docs/api/lineOffset.mdx +++ b/docs/api/lineOffset.mdx @@ -4,8 +4,13 @@ title: lineOffset import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) at offset by the specified distance. @@ -15,16 +20,13 @@ Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a | Name | Type | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | geojson | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | input GeoJSON | -| distance | **number** | distance to offset the line (can be of negative value) | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, kilometers, inches, yards, meters _(default 'kilometers')_ | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance to offset the line (can be of negative value) | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, kilometers, inches, yards, meters _(default 'kilometers')_ | ### Returns -
    - **[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)\>** Line offset from the input line - -
+**[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)\>** Line offset from the input line ### Examples @@ -64,7 +66,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineOverlap.mdx b/docs/api/lineOverlap.mdx index cbf4151f..eaad2822 100644 --- a/docs/api/lineOverlap.mdx +++ b/docs/api/lineOverlap.mdx @@ -4,8 +4,13 @@ title: lineOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon and returns the overlapping lines between both features. @@ -16,15 +21,12 @@ Takes any LineString or Polygon and returns the overlapping lines between both f | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | line1 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | any LineString or Polygon | | line2 | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | any LineString or Polygon | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.tolerance? | **number** | Tolerance distance to match overlapping line segments (in kilometers) _(default 0)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.tolerance? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Tolerance distance to match overlapping line segments (in kilometers) _(default 0)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** lines(s) that are overlapping between both features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** lines(s) that are overlapping between both features ### Examples @@ -71,7 +73,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineReduce.mdx b/docs/api/lineReduce.mdx index a10d4848..e63d4280 100644 --- a/docs/api/lineReduce.mdx +++ b/docs/api/lineReduce.mdx @@ -4,26 +4,28 @@ title: lineReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| geojson | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** | object | -| callback | **Function** | a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Lines](docs/api/types/Lines.mdx)\> \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Lines](docs/api/types/Lines.mdx)\> \| [Lines](docs/api/types/Lines.mdx) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\> \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** | object | +| callback | **Function** | a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/lineSegment.mdx b/docs/api/lineSegment.mdx index b8b71a04..8a5ff3f4 100644 --- a/docs/api/lineSegment.mdx +++ b/docs/api/lineSegment.mdx @@ -4,8 +4,13 @@ title: lineSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of 2-vertex [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) segments from a @@ -19,10 +24,7 @@ Creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) o ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** 2-vertex line segments - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** 2-vertex line segments ### Examples @@ -61,7 +63,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineSlice.mdx b/docs/api/lineSlice.mdx index 6fa1ffa6..7f4b4c66 100644 --- a/docs/api/lineSlice.mdx +++ b/docs/api/lineSlice.mdx @@ -4,8 +4,13 @@ title: lineSlice import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), and a stop point @@ -24,10 +29,7 @@ This can be useful for extracting only the part of a route between waypoints. ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** sliced line - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** sliced line ### Examples @@ -70,7 +72,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineSliceAlong.mdx b/docs/api/lineSliceAlong.mdx index 309f54a9..56b5a4dc 100644 --- a/docs/api/lineSliceAlong.mdx +++ b/docs/api/lineSliceAlong.mdx @@ -4,8 +4,13 @@ title: lineSliceAlong import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a specified distance along the line to a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), @@ -19,17 +24,14 @@ This can be useful for extracting only the part of a route between two distances | 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)\> \| [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)** | input line | -| startDist | **number** | distance along the line to starting point | -| stopDist | **number** | distance along the line to ending point | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| startDist | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance along the line to starting point | +| stopDist | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance along the line to ending point | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** sliced line - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** sliced line ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineSplit.mdx b/docs/api/lineSplit.mdx index 8167dbeb..2fec8c66 100644 --- a/docs/api/lineSplit.mdx +++ b/docs/api/lineSplit.mdx @@ -4,8 +4,13 @@ title: lineSplit import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Split a LineString by another GeoJSON Feature. @@ -19,10 +24,7 @@ Split a LineString by another GeoJSON Feature. ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** Split LineStrings - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** Split LineStrings ### Examples @@ -61,7 +63,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/lineString.mdx b/docs/api/lineString.mdx index 8c0dc22c..729f9e14 100644 --- a/docs/api/lineString.mdx +++ b/docs/api/lineString.mdx @@ -4,28 +4,30 @@ title: lineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of Positions. ### Parameters -| Name | Type | Description | -| -------------------- | ---------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>** | an array of Positions | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** | an array of Positions | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** LineString Feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** LineString Feature ### Examples diff --git a/docs/api/lineStrings.mdx b/docs/api/lineStrings.mdx index 62406b85..c02f65c5 100644 --- a/docs/api/lineStrings.mdx +++ b/docs/api/lineStrings.mdx @@ -4,28 +4,30 @@ title: lineStrings import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of LineString coordinates. ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------- | ----------------------------------------------------------------------------------- | -| coordinates | **Array\\>\>** | an array of LinearRings | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the FeatureCollection | -| options.id? | **string \| number** | Identifier associated with the FeatureCollection | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| coordinates | **UNCERTAIN** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the FeatureCollection | +| options.id? | **Id** | Identifier associated with the FeatureCollection | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** LineString FeatureCollection - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** LineString FeatureCollection ### Examples diff --git a/docs/api/lineToPolygon.mdx b/docs/api/lineToPolygon.mdx index 1c28fc94..5cb8b83a 100644 --- a/docs/api/lineToPolygon.mdx +++ b/docs/api/lineToPolygon.mdx @@ -4,8 +4,13 @@ title: lineToPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts (Multi)LineString(s) to Polygon(s). @@ -15,18 +20,15 @@ Converts (Multi)LineString(s) to Polygon(s). | Name | Type | Description | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | lines | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [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)\>** | Features to convert | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | translates GeoJSON properties to Feature _(default \{\})_ | -| options.autoComplete? | **boolean** | auto complete linestrings (matches first & last coordinates) _(default true)_ | -| options.orderCoords? | **boolean** | sorts linestrings to place outer ring at the first position of the coordinates _(default true)_ | -| options.mutate? | **boolean** | mutate the original linestring using autoComplete (matches first & last coordinates) _(default false)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | translates GeoJSON properties to Feature _(default \{\})_ | +| options.autoComplete? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | auto complete linestrings (matches first & last coordinates) _(default true)_ | +| options.orderCoords? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | sorts linestrings to place outer ring at the first position of the coordinates _(default true)_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | mutate the original linestring using autoComplete (matches first & last coordinates) _(default false)_ | ### Returns -
    - **[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)\>** converted to Polygons - -
+**[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)\>** converted to Polygons ### Examples @@ -63,7 +65,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/mask.mdx b/docs/api/mask.mdx index 57823849..1287d6b7 100644 --- a/docs/api/mask.mdx +++ b/docs/api/mask.mdx @@ -4,30 +4,35 @@ title: mask import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes any type of [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) and an optional mask and returns a [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) exterior ring with holes. +Takes polygons or multipolygons and an optional mask, and returns an exterior +ring polygon with holes. ### Parameters -| Name | Type | Description | -| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| polygon | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [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)\>** | GeoJSON Polygon used as interior rings or holes. | -| mask? | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used) | +| Name | Type | Description | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| polygon | **[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) \| [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)\> \| [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)\>** | GeoJSON polygon used as interior rings or holes | +| mask? | **[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | GeoJSON polygon used as the exterior ring (if undefined, the world extent is used) | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows the `mask` GeoJSON input to be mutated (performance improvement if true) _(default false)_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Masked Polygon (exterior ring with holes). - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Masked Polygon (exterior ring with holes) ### Examples ```javascript -var polygon = turf.polygon([ +const polygon = turf.polygon([ [ [112, -21], [116, -36], @@ -37,7 +42,7 @@ var polygon = turf.polygon([ [112, -21], ], ]); -var mask = turf.polygon([ +const mask = turf.polygon([ [ [90, -55], [170, -55], @@ -47,14 +52,14 @@ var mask = turf.polygon([ ], ]); -var masked = turf.mask(polygon, mask); +const masked = turf.mask(polygon, mask); ``` export function Map0() { "use strict"; // jsdoc example start - var polygon = turf.polygon([ + const polygon = turf.polygon([ [ [112, -21], [116, -36], @@ -64,7 +69,7 @@ export function Map0() { [112, -21], ], ]); - var mask = turf.polygon([ + const mask = turf.polygon([ [ [90, -55], [170, -55], @@ -74,16 +79,15 @@ export function Map0() { ], ]); - var masked = turf.mask(polygon, mask); + const masked = turf.mask(polygon, mask); //addToMap - var addToMap = { masked }; + const addToMap = [masked]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/midpoint.mdx b/docs/api/midpoint.mdx index 6c6f4e64..8fe45551 100644 --- a/docs/api/midpoint.mdx +++ b/docs/api/midpoint.mdx @@ -4,12 +4,18 @@ title: midpoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a point midway between them. -The midpoint is calculated geodesically, meaning the curvature of the earth is taken into account. +Takes two points and returns a point midway between them. The midpoint is +calculated geodesically, meaning the curvature of the earth is taken into +account. ### Parameters @@ -20,38 +26,34 @@ The midpoint is calculated geodesically, meaning the curvature of the earth is t ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a point midway between `pt1` and `pt2` - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a point midway between `pt1` and `pt2` ### Examples ```javascript -var point1 = turf.point([144.834823, -37.771257]); -var point2 = turf.point([145.14244, -37.830937]); +const point1 = turf.point([144.834823, -37.771257]); +const point2 = turf.point([145.14244, -37.830937]); -var midpoint = turf.midpoint(point1, point2); +const midpoint = turf.midpoint(point1, point2); ``` export function Map0() { "use strict"; // jsdoc example start - var point1 = turf.point([144.834823, -37.771257]); - var point2 = turf.point([145.14244, -37.830937]); + const point1 = turf.point([144.834823, -37.771257]); + const point2 = turf.point([145.14244, -37.830937]); - var midpoint = turf.midpoint(point1, point2); + const midpoint = turf.midpoint(point1, point2); //addToMap - var addToMap = { point1, point2, midpoint }; + const addToMap = [point1, point2, midpoint]; midpoint.properties["marker-color"] = "#f00"; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/moranIndex.mdx b/docs/api/moranIndex.mdx index aa3d1690..3914f782 100644 --- a/docs/api/moranIndex.mdx +++ b/docs/api/moranIndex.mdx @@ -4,8 +4,13 @@ title: moranIndex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moran's I measures patterns of attribute values associated with features. @@ -30,20 +35,20 @@ the z-score can be calculated based on a normal or random assumption. ### Parameters -| Name | Type | Description | -| ------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------- | -| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | | -| options | **Object** | | -| options.inputField | **string** | the property name, must contain numeric values | -| options.threshold? | **number** | the distance threshold _(default 100000)_ | -| options.p? | **number** | the Minkowski p-norm distance parameter _(default 2)_ | -| options.binary? | **boolean** | whether transfrom the distance to binary _(default false)_ | -| options.alpha? | **number** | the distance decay parameter _(default -1)_ | -| options.standardization? | **boolean** | wheter row standardization the distance _(default true)_ | +| Name | Type | Description | +| ------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | +| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | | +| options | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | | +| options.inputField | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name, must contain numeric values | +| options.threshold? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the distance threshold _(default 100000)_ | +| options.p? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the Minkowski p-norm distance parameter _(default 2)_ | +| options.binary? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether transfrom the distance to binary _(default false)_ | +| options.alpha? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the distance decay parameter _(default -1)_ | +| options.standardization? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | wheter row standardization the distance _(default true)_ | ### Returns -
    **MoranIndex**
+**[MoranIndex](docs/api/types/MoranIndex.mdx)** ### Examples diff --git a/docs/api/multiLineString.mdx b/docs/api/multiLineString.mdx index a59b3c00..1d3a7579 100644 --- a/docs/api/multiLineString.mdx +++ b/docs/api/multiLineString.mdx @@ -4,8 +4,13 @@ title: multiLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\> based on a @@ -13,20 +18,17 @@ coordinate array. Properties can be added optionally. ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>\>** | an array of LineStrings | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **UNCERTAIN** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\>** a MultiLineString feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a MultiLineString feature ### Examples diff --git a/docs/api/multiPoint.mdx b/docs/api/multiPoint.mdx index 34010a4c..7edf3e94 100644 --- a/docs/api/multiPoint.mdx +++ b/docs/api/multiPoint.mdx @@ -4,8 +4,13 @@ title: multiPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\> based on a @@ -13,20 +18,17 @@ coordinate array. Properties can be added optionally. ### Parameters -| Name | Type | Description | -| -------------------- | ---------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>** | an array of Positions | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** | an array of Positions | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\>** a MultiPoint feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a MultiPoint feature ### Examples diff --git a/docs/api/multiPolygon.mdx b/docs/api/multiPolygon.mdx index 4f2bd283..121bec9b 100644 --- a/docs/api/multiPolygon.mdx +++ b/docs/api/multiPolygon.mdx @@ -4,8 +4,13 @@ title: multiPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\> based on a @@ -13,20 +18,17 @@ coordinate array. Properties can be added optionally. ### Parameters -| Name | Type | Description | -| -------------------- | ---------------------------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>\>\>** | an array of Polygons | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **UNCERTAIN** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\>** a multipolygon feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a multipolygon feature ### Examples diff --git a/docs/api/nearestNeighborAnalysis.mdx b/docs/api/nearestNeighborAnalysis.mdx new file mode 100644 index 00000000..605d5e7f --- /dev/null +++ b/docs/api/nearestNeighborAnalysis.mdx @@ -0,0 +1,102 @@ +--- +title: nearestNeighborAnalysis +--- + +import * as turf from "turf-next"; +import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Nearest Neighbor Analysis calculates an index based the average distances +between points in the dataset, thereby providing inference as to whether the +data is clustered, dispersed, or randomly distributed within the study area. + +It returns a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> of the study area, with the results of +the analysis attached as part of of the `nearestNeighborAnalysis` property +of the study area's `properties`. The attached +[_z_-score](https://en.wikipedia.org/wiki/Standard_score) indicates how many +standard deviations above or below the expected mean distance the data's +observed mean distance is. The more negative, the more clustered. The more +positive, the more evenly dispersed. A _z_-score between -2 and 2 indicates +a seemingly random distribution. That is, within _p_ of less than 0.05, the +distribution appears statistically significantly neither clustered nor +dispersed. + +**Remarks** + +- Though the analysis will work on any [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) type, it + works best with [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) collections. +- This analysis is _very_ sensitive to the study area provided. + If no [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> is passed as the study area, the function draws a box + around the data, which may distort the findings. This analysis works best + with a bounded area of interest within with the data is either clustered, + dispersed, or randomly distributed. For example, a city's subway stops may + look extremely clustered if the study area is an entire state. On the other + hand, they may look rather evenly dispersed if the study area is limited to + the city's downtown. + +**Bibliography** + +Philip J. Clark and Francis C. Evans, “Distance to Nearest Neighbor as a +Measure of Spatial Relationships in Populations,” _Ecology_ 35, no. 4 +(1954): 445–453, doi:[10.2307/1931034](http://doi.org/10.2307/1931034). + +### Parameters + +| Name | Type | Description | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | +| dataset | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | FeatureCollection (pref. of points) to study | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.studyArea? | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | polygon representing the study area | +| options.properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | properties _(default \{\})_ | + +### Returns + +**[NearestNeighborStudyArea](docs/api/types/NearestNeighborStudyArea.mdx)** A polygon of the study area or an approximation of one. + +### Examples + +```javascript +var bbox = [-65, 40, -63, 42]; +var dataset = turf.randomPoint(100, { bbox: bbox }); +var nearestNeighborStudyArea = turf.nearestNeighborAnalysis(dataset); +``` + +export function Map0() { + "use strict"; + + // jsdoc example start + var bbox = [-65, 40, -63, 42]; + var dataset = turf.randomPoint(100, { bbox: bbox }); + var nearestNeighborStudyArea = turf.nearestNeighborAnalysis(dataset); + + //addToMap + var addToMap = { dataset, nearestNeighborStudyArea }; + // jsdoc example end + + return ; +} + +{() => } + +### Installation + +```javascript +$ npm install @turf/nearest-neighbor-analysis + +import { nearestNeighborAnalysis } from "@turf/nearest-neighbor-analysis"; +const result = nearestNeighborAnalysis(...); +``` + +```javascript +$ npm install @turf/turf + +import * as turf from "@turf/turf"; +const result = turf.nearestNeighborAnalysis(...); +``` diff --git a/docs/api/nearestPoint.mdx b/docs/api/nearestPoint.mdx index 33d52fe4..f50c4074 100644 --- a/docs/api/nearestPoint.mdx +++ b/docs/api/nearestPoint.mdx @@ -4,8 +4,13 @@ title: nearestPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a reference [point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a FeatureCollection of Features @@ -19,15 +24,12 @@ is geodesic. | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | | targetPoint | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | the reference point | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | against input point set | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | the units of the numeric result _(default 'kilometers')_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the units of the numeric result _(default 'kilometers')_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the closest point in the set to the reference point - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the closest point in the set to the reference point ### Examples @@ -67,7 +69,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/nearestPointOnLine.mdx b/docs/api/nearestPointOnLine.mdx index f1236709..286e9fc7 100644 --- a/docs/api/nearestPointOnLine.mdx +++ b/docs/api/nearestPointOnLine.mdx @@ -4,27 +4,29 @@ title: nearestPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and calculates the closest Point on the (Multi)LineString. +Returns the nearest point on a line to a given point. ### Parameters -| Name | Type | Description | -| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | -| lines | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | lines to snap to | -| pt | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| Array\** | point to snap from | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| Name | Type | Description | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| lines | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [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)\>** | lines to snap to | +| pt | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | point to snap from | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** closest point on the `line` to `point`. The properties object will contain three values: `index`: closest point was found on nth line part, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point. - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** closest point on the `line` to `point`. The properties object will contain four values: `index`: closest point was found on nth line part, `multiFeatureIndex`: closest point was found on the nth line of the `MultiLineString`, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point. ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/nearestPointToLine.mdx b/docs/api/nearestPointToLine.mdx index 5ab15271..39ac89fd 100644 --- a/docs/api/nearestPointToLine.mdx +++ b/docs/api/nearestPointToLine.mdx @@ -4,8 +4,13 @@ title: nearestPointToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the closest [point](https://tools.ietf.org/html/rfc7946#section-3.1.2), of a [collection](https://tools.ietf.org/html/rfc7946#section-3.3) of points, @@ -17,16 +22,13 @@ to a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4). The returned poi | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | Point Collection | | line | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | Line Feature | -| options? | **Object** | Optional parameters | -| options.units? | **string** | unit of the output distance property (eg: degrees, radians, miles, or kilometers) _(default 'kilometers')_ | -| options.properties? | **Object** | Translate Properties to Point _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | unit of the output distance property (eg: degrees, radians, miles, or kilometers) _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to Point _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the closest point - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** the closest point ### Examples @@ -63,7 +65,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/pNormDistance.mdx b/docs/api/pNormDistance.mdx index f5097df5..338996ed 100644 --- a/docs/api/pNormDistance.mdx +++ b/docs/api/pNormDistance.mdx @@ -4,23 +4,28 @@ title: pNormDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description calcualte the Minkowski p-norm distance between two features. ### Parameters -| Name | Type | Description | -| -------- | ------------- | ------------------------------------------------------------------- | -| feature1 | **UNCERTAIN** | point feature | -| feature2 | **UNCERTAIN** | point feature | -| p | **UNCERTAIN** | p-norm 1=\**number** +**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** ### Installation diff --git a/docs/api/planepoint.mdx b/docs/api/planepoint.mdx index f12673be..790c5a78 100644 --- a/docs/api/planepoint.mdx +++ b/docs/api/planepoint.mdx @@ -4,13 +4,19 @@ title: planepoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a triangular plane as a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) -and a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) within that triangle and returns the z-value -at that point. The Polygon should have properties `a`, `b`, and `c` +Takes a triangular plane as a polygon and a point within that triangle, and +returns the z-value at that point. + +The Polygon should have properties `a`, `b`, and `c` that define the values at its three corners. Alternatively, the z-values of each triangle point can be provided by their respective 3rd coordinate if their values are not provided as properties. @@ -24,17 +30,14 @@ if their values are not provided as properties. ### Returns -
    - **number** the z-value for `interpolatedPoint` - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the z-value for `interpolatedPoint` ### Examples ```javascript -var point = turf.point([-75.3221, 39.529]); +const point = turf.point([-75.3221, 39.529]); // "a", "b", and "c" values represent the values of the coordinates in order. -var triangle = turf.polygon( +const triangle = turf.polygon( [ [ [-75.1221, 39.57], @@ -50,7 +53,7 @@ var triangle = turf.polygon( }, ); -var zValue = turf.planepoint(point, triangle); +const zValue = turf.planepoint(point, triangle); point.properties.zValue = zValue; ``` @@ -58,9 +61,9 @@ export function Map0() { "use strict"; // jsdoc example start - var point = turf.point([-75.3221, 39.529]); + const point = turf.point([-75.3221, 39.529]); // "a", "b", and "c" values represent the values of the coordinates in order. - var triangle = turf.polygon( + const triangle = turf.polygon( [ [ [-75.1221, 39.57], @@ -76,17 +79,16 @@ export function Map0() { }, ); - var zValue = turf.planepoint(point, triangle); + const zValue = turf.planepoint(point, triangle); point.properties.zValue = zValue; //addToMap - var addToMap = { triangle, point }; + const addToMap = [triangle, point]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/point.mdx b/docs/api/point.mdx index d9b8ceeb..354e57f7 100644 --- a/docs/api/point.mdx +++ b/docs/api/point.mdx @@ -4,28 +4,30 @@ title: point import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from a Position. ### Parameters -| Name | Type | Description | -| -------------------- | -------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\** | longitude, latitude position (each in decimal degrees) | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **Position** | longitude, latitude position (each in decimal degrees) | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a Point feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** a Point feature ### Examples diff --git a/docs/api/pointGrid.mdx b/docs/api/pointGrid.mdx index 505a2d9e..ae17b4bb 100644 --- a/docs/api/pointGrid.mdx +++ b/docs/api/pointGrid.mdx @@ -4,29 +4,31 @@ title: pointGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) grid from a bounding box, [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) or [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). +Creates a grid of points ### Parameters -| Name | Type | Description | -| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| bbox | **Array\** | extent in [minX, minY, maxX, maxY] order | -| cellSide | **number** | the distance between points, in units | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | used in calculating cellSide, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.mask? | **[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)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | -| options.properties? | **Object** | passed to each point of the grid _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent of grid in [minX, minY, maxX, maxY] order | +| cellSide | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the distance between points | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | the units of the cellSide value. Supports all valid Turf [Units](https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md) _(default 'kilometers')_ | +| options.mask? | **[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)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | passed to each point of the grid _(default \{\})_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** grid of points - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** grid of points ### Examples @@ -55,7 +57,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/pointOnFeature.mdx b/docs/api/pointOnFeature.mdx index 4df04799..cc73f49e 100644 --- a/docs/api/pointOnFeature.mdx +++ b/docs/api/pointOnFeature.mdx @@ -4,8 +4,13 @@ title: pointOnFeature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) guaranteed to be on the surface of the feature. @@ -22,10 +27,7 @@ Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.or ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a point on the surface of `input` - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** a point on the surface of `input` ### Examples @@ -70,7 +72,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/pointToLineDistance.mdx b/docs/api/pointToLineDistance.mdx index 311c6379..e2b68303 100644 --- a/docs/api/pointToLineDistance.mdx +++ b/docs/api/pointToLineDistance.mdx @@ -4,29 +4,31 @@ title: pointToLineDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Returns the minimum distance between a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), being the distance from a line the -minimum distance between the point and any segment of the `LineString`. +Calculates the distance between a given point and the nearest point on a +line. Sometimes referred to as the cross track distance. ### Parameters -| Name | Type | Description | -| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| pt | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| Array\** | Feature or Geometry | -| line | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | GeoJSON Feature or Geometry | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be anything supported by turf/convertLength (ex: degrees, radians, miles, or kilometers) _(default "kilometers")_ | -| options.method? | **string** | wether to calculate the distance based on geodesic (spheroid) or planar (flat) method. Valid options are 'geodesic' or 'planar'. _(default "geodesic")_ | +| Name | Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| pt | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\> \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | Feature or Geometry | +| line | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | GeoJSON Feature or Geometry | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be anything supported by turf/convertLength (ex: degrees, radians, miles, or kilometers) _(default "kilometers")_ | +| options.method? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | whether to calculate the distance based on geodesic (spheroid) or planar (flat) method. Valid options are 'geodesic' or 'planar'. _(default "geodesic")_ | ### Returns -
    - **number** distance between point and line - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance between point and line ### Examples diff --git a/docs/api/points.mdx b/docs/api/points.mdx index 63aa23b8..583971ab 100644 --- a/docs/api/points.mdx +++ b/docs/api/points.mdx @@ -4,28 +4,30 @@ title: points import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Point coordinates. ### Parameters -| Name | Type | Description | -| -------------------- | ---------------------------- | ----------------------------------------------------------------------------------- | -| coordinates | **Array\\>** | an array of Points | -| properties? | **Object** | Translate these properties to each Feature _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the FeatureCollection | -| options.id? | **string \| number** | Identifier associated with the FeatureCollection | +| Name | Type | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| coordinates | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\** | an array of Points | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | Translate these properties to each Feature _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the FeatureCollection | +| options.id? | **Id** | Identifier associated with the FeatureCollection | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Point Feature - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Point Feature ### Examples diff --git a/docs/api/pointsWithinPolygon.mdx b/docs/api/pointsWithinPolygon.mdx index c22f9358..16fa2acd 100644 --- a/docs/api/pointsWithinPolygon.mdx +++ b/docs/api/pointsWithinPolygon.mdx @@ -4,8 +4,13 @@ title: pointsWithinPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds [Points](https://tools.ietf.org/html/rfc7946#section-3.1.2) or [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) coordinate positions that fall within [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6). @@ -19,10 +24,7 @@ Finds [Points](https://tools.ietf.org/html/rfc7946#section-3.1.2) or [MultiPoint ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\>** Point(s) or MultiPoint(s) with positions that land within at least one polygon. The geometry type will match what was passsed in - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) \| [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\>** Point(s) or MultiPoint(s) with positions that land within at least one polygon. The geometry type will match what was passsed in ### Examples @@ -87,7 +89,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/polygon.mdx b/docs/api/polygon.mdx index 6ba3c362..9950073e 100644 --- a/docs/api/polygon.mdx +++ b/docs/api/polygon.mdx @@ -4,28 +4,30 @@ title: polygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of LinearRings. ### Parameters -| Name | Type | Description | -| -------------------- | ------------------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>\>** | an array of LinearRings | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the Feature | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **UNCERTAIN** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the Feature | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Polygon Feature - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** Polygon Feature ### Examples diff --git a/docs/api/polygonSmooth.mdx b/docs/api/polygonSmooth.mdx index 4133075d..ca53b86c 100644 --- a/docs/api/polygonSmooth.mdx +++ b/docs/api/polygonSmooth.mdx @@ -4,8 +4,13 @@ title: polygonSmooth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Smooths a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7). Based on [Chaikin's algorithm](http://graphics.cs.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html). @@ -16,15 +21,12 @@ Warning: may create degenerate polygons. | Name | Type | Description | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | inputPolys | **[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)\> \| [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)\> \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)** | (Multi)Polygon(s) to smooth | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.iterations? | **string** | The number of times to smooth the polygon. A higher value means a smoother polygon. _(default 1)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.iterations? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | The number of times to smooth the polygon. A higher value means a smoother polygon. _(default 1)_ | ### Returns -
    - **[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)\>** FeatureCollection containing the smoothed polygon/multipoylgons - -
+**[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)\>** FeatureCollection containing the smoothed polygon/multipoylgons ### Examples @@ -69,7 +71,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/polygonTangents.mdx b/docs/api/polygonTangents.mdx index 72f78c88..0690831f 100644 --- a/docs/api/polygonTangents.mdx +++ b/docs/api/polygonTangents.mdx @@ -4,8 +4,13 @@ title: polygonTangents import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the tangents of a [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) from a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2). @@ -19,10 +24,7 @@ Finds the tangents of a [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#sec ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Feature Collection containing the two tangent points - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Feature Collection containing the two tangent points ### Examples @@ -69,7 +71,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/polygonToLine.mdx b/docs/api/polygonToLine.mdx index e20319a7..0cf0f25f 100644 --- a/docs/api/polygonToLine.mdx +++ b/docs/api/polygonToLine.mdx @@ -4,8 +4,13 @@ title: polygonToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) to [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) to a @@ -16,15 +21,12 @@ Converts a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) to [(Mul | Name | Type | Description | | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | poly | **[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)\>** | Feature to convert | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.properties? | **Object** | translates GeoJSON properties to Feature _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | translates GeoJSON properties to Feature _(default \{\})_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| MultiLinestring\>** converted (Multi)Polygon to (Multi)LineString - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| MultiLinestring\>** converted (Multi)Polygon to (Multi)LineString ### Examples @@ -65,7 +67,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/polygonize.mdx b/docs/api/polygonize.mdx index a092a155..49e56c28 100644 --- a/docs/api/polygonize.mdx +++ b/docs/api/polygonize.mdx @@ -4,8 +4,13 @@ title: polygonize import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Polygonizes [(Multi)LineString(s)](https://tools.ietf.org/html/rfc7946#section-3.1.4) into [Polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6). @@ -28,10 +33,7 @@ The implementation correctly handles: ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Polygons created - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Polygons created ### Installation diff --git a/docs/api/polygons.mdx b/docs/api/polygons.mdx index 6da5aa0a..8cd8ef96 100644 --- a/docs/api/polygons.mdx +++ b/docs/api/polygons.mdx @@ -4,28 +4,30 @@ title: polygons import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Polygon coordinates. ### Parameters -| Name | Type | Description | -| -------------------- | ---------------------------------------------- | ------------------------------------------------------------------------- | -| coordinates | **Array\\>\>\>** | an array of Polygon coordinates | -| properties? | **Object** | an Object of key-value pairs to add as properties _(default \{\})_ | -| options? | **Object** | Optional Parameters _(default \{\})_ | -| options.bbox? | **Array\** | Bounding Box Array [west, south, east, north] associated with the Feature | -| options.id? | **string \| number** | Identifier associated with the FeatureCollection | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| coordinates | **UNCERTAIN** | | +| properties? | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | an Object of key-value pairs to add as properties _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | Bounding Box Array [west, south, east, north] associated with the Feature | +| options.id? | **Id** | Identifier associated with the FeatureCollection | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Polygon FeatureCollection - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6), [GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)\>** Polygon FeatureCollection ### Examples diff --git a/docs/api/propEach.mdx b/docs/api/propEach.mdx index 76b5f8c3..3e9cd68f 100644 --- a/docs/api/propEach.mdx +++ b/docs/api/propEach.mdx @@ -4,8 +4,13 @@ title: propEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over properties in any GeoJSON object, similar to Array.forEach() @@ -15,11 +20,11 @@ Iterate over properties in any GeoJSON object, similar to Array.forEach() | Name | Type | Description | | -------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | any GeoJSON object | -| callback | **Function** | a method that takes (currentProperties, featureIndex) | +| callback | **[propEachCallback](docs/api/types/propEachCallback.mdx)** | a method that takes (currentProperties, featureIndex) | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/propReduce.mdx b/docs/api/propReduce.mdx index 1958c44e..c13f8d88 100644 --- a/docs/api/propReduce.mdx +++ b/docs/api/propReduce.mdx @@ -4,8 +4,13 @@ title: propReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce properties in any GeoJSON object into a single value, @@ -14,18 +19,15 @@ the reduction, so an array of all properties is unnecessary. ### Parameters -| Name | Type | Description | -| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | any GeoJSON object | -| callback | **Function** | a method that takes (previousValue, currentProperties, featureIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON object | +| callback | **[propReduceCallback](docs/api/types/propReduceCallback.mdx)** | a method that takes (previousValue, currentProperties, featureIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    - **\*** The value that results from the reduction. - -
+**Reducer** The value that results from the reduction. ### Examples diff --git a/docs/api/quadratAnalysis.mdx b/docs/api/quadratAnalysis.mdx index 49103125..0d4fbd6a 100644 --- a/docs/api/quadratAnalysis.mdx +++ b/docs/api/quadratAnalysis.mdx @@ -4,8 +4,13 @@ title: quadratAnalysis import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts @@ -35,19 +40,16 @@ which is simply the area of the study area divided by the number of features. ### Parameters -| Name | Type | Description | -| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| pointFeatureSet | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | point set to study | -| options? | **Object** | optional parameters _(default \{\})_ | -| options.studyBbox? | **bbox** | bbox representing the study area | -| options.confidenceLevel? | **number** | a confidence level. The unit is percentage . 5 means 95%, value must be in \{@link K*TABLE\} *(default 20)\_ | +| Name | Type | Description | +| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| pointFeatureSet | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | point set to study | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | optional parameters _(default \{\})_ | +| options.studyBbox? | **[[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | bbox representing the study area | +| options.confidenceLevel? | **20 \| 15 \| 10 \| 5 \| 2 \| 1** | a confidence level. The unit is percentage . 5 means 95%, value must be in [K_TABLE](docs/api/constants/K_TABLE.mdx) _(default 20)_ | ### Returns -
    - **Object** result QuadratAnalysisResult - -
+**[QuadratAnalysisResult](docs/api/types/QuadratAnalysisResult.mdx)** result ### Examples diff --git a/docs/api/radiansToDegrees.mdx b/docs/api/radiansToDegrees.mdx index b5865f4d..d4da85e7 100644 --- a/docs/api/radiansToDegrees.mdx +++ b/docs/api/radiansToDegrees.mdx @@ -4,24 +4,26 @@ title: radiansToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in radians to degrees ### Parameters -| Name | Type | Description | -| ------- | ---------- | ---------------- | -| radians | **number** | angle in radians | +| Name | Type | Description | +| ------- | ----------------------------------------------------------------------------------------------- | ---------------- | +| radians | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle in radians | ### Returns -
    - **number** degrees between 0 and 360 degrees - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** degrees between 0 and 360 degrees ### Installation diff --git a/docs/api/radiansToLength.mdx b/docs/api/radiansToLength.mdx index 6f6660ae..c8fbabc9 100644 --- a/docs/api/radiansToLength.mdx +++ b/docs/api/radiansToLength.mdx @@ -4,8 +4,13 @@ title: radiansToLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. @@ -13,17 +18,14 @@ Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, ce ### Parameters -| Name | Type | Description | -| ------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | -| radians | **number** | in radians across the sphere | -| units? | **string** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | +| Name | Type | Description | +| ------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| radians | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | in radians across the sphere | +| units? | **[Units](docs/api/types/Units.mdx)** | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. _(default "kilometers")_ | ### Returns -
    - **number** distance - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance ### Installation diff --git a/docs/api/randomLineString.mdx b/docs/api/randomLineString.mdx index 17b61791..da4ffd8c 100644 --- a/docs/api/randomLineString.mdx +++ b/docs/api/randomLineString.mdx @@ -4,29 +4,31 @@ title: randomLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4). ### Parameters -| Name | Type | Description | -| ---------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- | -| count? | **number** | how many geometries will be generated _(default 1)_ | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.bbox? | **Array\** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | -| options.num_vertices? | **number** | is how many coordinates each LineString will contain. _(default 10)_ | -| options.max_length? | **number** | is the maximum number of decimal degrees that a vertex can be from its predecessor _(default 0.0001)_ | -| options.max_rotation? | **number** | is the maximum number of radians that a line segment can turn from the previous segment. _(default Math.PI/8)_ | +| Name | Type | Description | +| ---------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| count? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | how many geometries will be generated _(default 1)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | +| options.num_vertices? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | is how many coordinates each LineString will contain. _(default 10)_ | +| options.max_length? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | is the maximum number of decimal degrees that a vertex can be from its predecessor _(default 0.0001)_ | +| options.max_rotation? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | is the maximum number of radians that a line segment can turn from the previous segment. _(default Math.PI/8)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** GeoJSON FeatureCollection of linestrings - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** GeoJSON FeatureCollection of linestrings ### Examples diff --git a/docs/api/randomPoint.mdx b/docs/api/randomPoint.mdx index b0597990..e824926e 100644 --- a/docs/api/randomPoint.mdx +++ b/docs/api/randomPoint.mdx @@ -4,26 +4,28 @@ title: randomPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [point](point). ### Parameters -| Name | Type | Description | -| -------------------- | ------------------- | ----------------------------------------------------------------------------------- | -| count? | **number** | how many geometries will be generated _(default 1)_ | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.bbox? | **Array\** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| count? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | how many geometries will be generated _(default 1)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** GeoJSON FeatureCollection of points - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** GeoJSON FeatureCollection of points ### Examples diff --git a/docs/api/randomPolygon.mdx b/docs/api/randomPolygon.mdx index 15edd903..790649c5 100644 --- a/docs/api/randomPolygon.mdx +++ b/docs/api/randomPolygon.mdx @@ -4,28 +4,30 @@ title: randomPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [polygon](polygon). ### Parameters -| Name | Type | Description | -| --------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| count? | **number** | how many geometries will be generated _(default 1)_ | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.bbox? | **Array\** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | -| options.num_vertices? | **number** | is how many coordinates each LineString will contain. _(default 10)_ | -| options.max_radial_length? | **number** | is the maximum number of decimal degrees latitude or longitude that a vertex can reach out of the center of the Polygon. _(default 10)_ | +| Name | Type | Description | +| --------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| count? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | how many geometries will be generated _(default 1)_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | a bounding box inside of which geometries are placed. _(default [-180,-90,180,90])_ | +| options.num_vertices? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | is how many coordinates each LineString will contain. _(default 10)_ | +| options.max_radial_length? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | is the maximum number of decimal degrees latitude or longitude that a vertex can reach out of the center of the Polygon. _(default 10)_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** GeoJSON FeatureCollection of polygons - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** GeoJSON FeatureCollection of polygons ### Examples diff --git a/docs/api/randomPosition.mdx b/docs/api/randomPosition.mdx index f1937ade..1406ff5c 100644 --- a/docs/api/randomPosition.mdx +++ b/docs/api/randomPosition.mdx @@ -4,24 +4,26 @@ title: randomPosition import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random position within a [bounding box](https://tools.ietf.org/html/rfc7946#section-5). ### Parameters -| Name | Type | Description | -| ------------ | ------------------- | ---------------------------------------------------------------------------------- | -| bbox? | **Array\** | a bounding box inside of which positions are placed. _(default [-180,-90,180,90])_ | +| Name | Type | Description | +| ------------ | --------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | a bounding box inside of which positions are placed. _(default [-180,-90,180,90])_ | ### Returns -
    - **Array\** Position [longitude, latitude] - -
+**Position** Position [longitude, latitude] ### Examples diff --git a/docs/api/rbush.mdx b/docs/api/rbush.mdx index 2743412c..5d6100a7 100644 --- a/docs/api/rbush.mdx +++ b/docs/api/rbush.mdx @@ -4,24 +4,26 @@ title: rbush import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index. ### Parameters -| Name | Type | Description | -| ------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| maxEntries? | **number** | defines the maximum number of entries in a tree node. 9 (used by default) is a reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa. _(default 9)_ | +| Name | Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| maxEntries? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | defines the maximum number of entries in a tree node. 9 (used by default) is a reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa. _(default 9)_ | ### Returns -
    - **RBush** GeoJSON RBush - -
+**RBush** GeoJSON RBush ### Examples diff --git a/docs/api/rectangleGrid.mdx b/docs/api/rectangleGrid.mdx new file mode 100644 index 00000000..09d31b3e --- /dev/null +++ b/docs/api/rectangleGrid.mdx @@ -0,0 +1,79 @@ +--- +title: rectangleGrid +--- + +import * as turf from "turf-next"; +import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Creates a grid of rectangular polygons with width and height consistent in degrees + +### Parameters + +| Name | Type | Description | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered. | +| cellWidth | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | width of each cell, in units | +| cellHeight | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | height of each cell, in units | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | the units of the cell width and height value. Supports all valid Turf [Units](https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md). If you are looking for rectangles with equal width and height in linear units (e.g. kilometers) this is not the module for you. The cellWidth and cellHeight is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees. _(default 'kilometers')_ | +| options.mask? | **[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)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | passed to each point of the grid _(default \{\})_ | + +### Returns + +**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a grid of polygons + +### Examples + +```javascript +var bbox = [-95, 30, -85, 40]; +var cellWidth = 50; +var cellHeight = 20; +var options = { units: "miles" }; + +var rectangleGrid = turf.rectangleGrid(bbox, cellWidth, cellHeight, options); +``` + +export function Map0() { + "use strict"; + + // jsdoc example start + var bbox = [-95, 30, -85, 40]; + var cellWidth = 50; + var cellHeight = 20; + var options = { units: "miles" }; + + var rectangleGrid = turf.rectangleGrid(bbox, cellWidth, cellHeight, options); + + //addToMap + var addToMap = { rectangleGrid }; + // jsdoc example end + + return ; +} + +{() => } + +### Installation + +```javascript +$ npm install @turf/rectangle-grid + +import { rectangleGrid } from "@turf/rectangle-grid"; +const result = rectangleGrid(...); +``` + +```javascript +$ npm install @turf/turf + +import * as turf from "@turf/turf"; +const result = turf.rectangleGrid(...); +``` diff --git a/docs/api/rewind.mdx b/docs/api/rewind.mdx index 5f64693f..6bcb5236 100644 --- a/docs/api/rewind.mdx +++ b/docs/api/rewind.mdx @@ -4,27 +4,29 @@ title: rewind import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rewind [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) outer ring counterclockwise and inner rings clockwise (Uses [Shoelace Formula](http://en.wikipedia.org/wiki/Shoelace_formula)). ### Parameters -| Name | Type | Description | -| ----------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input GeoJSON Polygon | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.reverse? | **boolean** | enable reverse winding _(default false)_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ----------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | input GeoJSON Polygon | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.reverse? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | enable reverse winding _(default false)_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** rewind Polygon - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** rewind Polygon ### Examples @@ -65,7 +67,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/rhumbBearing.mdx b/docs/api/rhumbBearing.mdx index ac55351d..d5977376 100644 --- a/docs/api/rhumbBearing.mdx +++ b/docs/api/rhumbBearing.mdx @@ -4,8 +4,13 @@ title: rhumbBearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the bearing angle between them along a Rhumb line @@ -13,19 +18,16 @@ i.e. the angle measured in degrees start the north line (0 degrees) ### Parameters -| Name | Type | Description | -| --------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | -| 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? | **Object** | Optional parameters | -| options.final? | **boolean** | calculates the final bearing if true _(default false)_ | +| Name | Type | Description | +| --------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| 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? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.final? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | calculates the final bearing if true _(default false)_ | ### Returns -
    - **number** bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise) - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise) ### Examples @@ -54,7 +56,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/rhumbDestination.mdx b/docs/api/rhumbDestination.mdx index be84d716..3cdd708d 100644 --- a/docs/api/rhumbDestination.mdx +++ b/docs/api/rhumbDestination.mdx @@ -4,8 +4,13 @@ title: rhumbDestination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the destination [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) having travelled the given distance along a Rhumb line from the @@ -13,21 +18,18 @@ origin Point with the (varant) given bearing. ### Parameters -| Name | Type | Description | -| -------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------- | -| origin | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | starting point | -| distance | **number** | distance from the starting point | -| bearing | **number** | varant bearing angle ranging from -180 to 180 degrees from north | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.properties? | **Object** | translate properties to destination point _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| origin | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | starting point | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance from the starting point | +| bearing | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | varant bearing angle ranging from -180 to 180 degrees from north | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | translate properties to destination point _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Destination point. - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** Destination point. ### Examples @@ -59,7 +61,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/rhumbDistance.mdx b/docs/api/rhumbDistance.mdx index 8f5a2a38..2ec12623 100644 --- a/docs/api/rhumbDistance.mdx +++ b/docs/api/rhumbDistance.mdx @@ -4,8 +4,13 @@ title: rhumbDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance along a rhumb line between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, @@ -13,19 +18,16 @@ miles, or kilometers. ### Parameters -| Name | Type | Description | -| --------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------- | -| from | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | origin point | -| to | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | destination point | -| options? | **Object** | Optional parameters | -| options.units? | **string** | can be degrees, radians, miles, or kilometers _(default "kilometers")_ | +| Name | Type | Description | +| --------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| from | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | origin point | +| to | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | destination point | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | can be degrees, radians, miles, or kilometers _(default "kilometers")_ | ### Returns -
    - **number** distance between the two points - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance between the two points ### Examples @@ -56,7 +58,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/round.mdx b/docs/api/round.mdx index 88cc2896..5b3b4f72 100644 --- a/docs/api/round.mdx +++ b/docs/api/round.mdx @@ -4,25 +4,27 @@ title: round import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Round number to precision ### Parameters -| Name | Type | Description | -| ----------------- | ---------- | ----------------------- | -| num | **number** | Number | -| precision? | **number** | Precision _(default 0)_ | +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ----------------------- | +| num | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Number | +| precision? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | Precision _(default 0)_ | ### Returns -
    - **number** rounded number - -
+**[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** rounded number ### Examples diff --git a/docs/api/sample.mdx b/docs/api/sample.mdx index 8a128fe0..9b814514 100644 --- a/docs/api/sample.mdx +++ b/docs/api/sample.mdx @@ -4,25 +4,28 @@ title: sample import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a FeatureCollection with given number of [features](https://tools.ietf.org/html/rfc7946#section-3.2) at random. ### Parameters -| Name | Type | Description | -| ----------------- | ------------------------------------------------------------------------ | ---------------------------- | -| featurecollection | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | set of input features | -| num | **number** | number of features to select | +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ---------------------------- | +| fc | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\** | | +| num | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of features to select | +| featurecollection | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | set of input features | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** a FeatureCollection with `n` features - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** a FeatureCollection with `n` features ### Examples @@ -51,7 +54,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/sector.mdx b/docs/api/sector.mdx index e8c61c5e..3dd8fab9 100644 --- a/docs/api/sector.mdx +++ b/docs/api/sector.mdx @@ -4,8 +4,13 @@ title: sector import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular sector of a circle of given radius and center [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), @@ -13,23 +18,20 @@ between (clockwise) bearing1 and bearing2; 0 bearing is North of center point, p ### Parameters -| Name | Type | Description | -| -------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------- | -| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | -| radius | **number** | radius of the circle | -| bearing1 | **number** | angle, in decimal degrees, of the first radius of the sector | -| bearing2 | **number** | angle, in decimal degrees, of the second radius of the sector | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | -| options.steps? | **number** | number of steps _(default 64)_ | -| options.properties? | **Properties** | Translate properties to Feature Polygon _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| center | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | center point | +| radius | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | radius of the circle | +| bearing1 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle, in decimal degrees, of the first radius of the sector | +| bearing2 | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | angle, in decimal degrees, of the second radius of the sector | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | miles, kilometers, degrees, or radians _(default 'kilometers')_ | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps _(default 64)_ | +| options.properties? | **Properties** | Translate properties to Feature Polygon _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** sector polygon - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** sector polygon ### Examples @@ -60,7 +62,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/segmentEach.mdx b/docs/api/segmentEach.mdx index 102f07ef..243ce9e4 100644 --- a/docs/api/segmentEach.mdx +++ b/docs/api/segmentEach.mdx @@ -4,8 +4,13 @@ title: segmentEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach() @@ -13,14 +18,14 @@ Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEa ### Parameters -| Name | Type | Description | -| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON | -| callback | **Function** | a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) | +| Name | Type | Description | +| -------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| geojson | **[AllGeoJSON](docs/api/types/AllGeoJSON.mdx)** | any GeoJSON | +| callback | **[segmentEachCallback](docs/api/types/segmentEachCallback.mdx)** | a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) | ### Returns -
    **void**
+**void** ### Examples diff --git a/docs/api/segmentReduce.mdx b/docs/api/segmentReduce.mdx index 64c210aa..7c6f3009 100644 --- a/docs/api/segmentReduce.mdx +++ b/docs/api/segmentReduce.mdx @@ -4,8 +4,13 @@ title: segmentReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() @@ -16,12 +21,12 @@ Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() | Name | Type | Description | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | | geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1)** | any GeoJSON | -| callback | **Function** | a method that takes (previousValue, currentSegment, currentIndex) | -| initialValue? | **\*** | Value to use as the first argument to the first call of the callback. | +| callback | **[segmentReduceCallback](docs/api/types/segmentReduceCallback.mdx)** | a method that takes (previousValue, currentSegment, currentIndex) | +| initialValue? | **Reducer** | Value to use as the first argument to the first call of the callback. | ### Returns -
    **void**
+**Reducer** ### Examples diff --git a/docs/api/shortestPath.mdx b/docs/api/shortestPath.mdx index 76b8c7c0..337e5968 100644 --- a/docs/api/shortestPath.mdx +++ b/docs/api/shortestPath.mdx @@ -4,30 +4,32 @@ title: shortestPath import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the shortest [path](https://tools.ietf.org/html/rfc7946#section-3.1.4) from [start](https://tools.ietf.org/html/rfc7946#section-3.1.2) to [end](https://tools.ietf.org/html/rfc7946#section-3.1.2) without colliding with -any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) in obstacles +any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) in obstacles [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> ### Parameters -| Name | Type | Description | -| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| start | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point | -| end | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point | -| options? | **Object** | optional parameters _(default \{\})_ | -| options.obstacles? | **[Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) \| [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | areas which path cannot travel | -| options.units? | **string** | unit in which resolution & minimum distance will be expressed in; it can be degrees, radians, miles, kilometers, ... _(default 'kilometers')_ | -| options.resolution? | **number** | distance between matrix points on which the path will be calculated _(default 100)_ | +| Name | Type | Description | +| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| start | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point | +| end | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | optional parameters _(default \{\})_ | +| options.obstacles? | **[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> \| [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | areas which path cannot travel | +| options.units? | **[Units](docs/api/types/Units.mdx)** | unit in which resolution & minimum distance will be expressed in; it can be degrees, radians, miles, kilometers, ... _(default 'kilometers')_ | +| options.resolution? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | distance between matrix points on which the path will be calculated _(default 100)_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** shortest path between start and end - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** shortest path between start and end ### Examples @@ -43,7 +45,7 @@ var options = { [0, -3], [0, -7], ], - ]), + ]).geometry, }; var path = turf.shortestPath(start, end, options); @@ -64,7 +66,7 @@ export function Map0() { [0, -3], [0, -7], ], - ]), + ]).geometry, }; var path = turf.shortestPath(start, end, options); @@ -76,7 +78,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/simplify.mdx b/docs/api/simplify.mdx index f8b216eb..55d863a0 100644 --- a/docs/api/simplify.mdx +++ b/docs/api/simplify.mdx @@ -4,8 +4,13 @@ title: simplify import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) object and returns a simplified version. Internally uses the 2d version of @@ -13,20 +18,17 @@ Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) object and retu ### Parameters -| Name | Type | Description | -| --------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | object to be simplified | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.tolerance? | **number** | simplification tolerance _(default 1)_ | -| options.highQuality? | **boolean** | whether or not to spend more time to create a higher-quality simplification with a different algorithm _(default false)_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| --------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | object to be simplified | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.tolerance? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | simplification tolerance _(default 1)_ | +| options.highQuality? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | whether or not to spend more time to create a higher-quality simplification with a different algorithm _(default false)_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** a simplified GeoJSON - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** a simplified GeoJSON ### Examples @@ -97,7 +99,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/square.mdx b/docs/api/square.mdx index 63695767..1a2b6b1c 100644 --- a/docs/api/square.mdx +++ b/docs/api/square.mdx @@ -4,8 +4,13 @@ title: square import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and calculates the minimum square bounding box that @@ -19,36 +24,29 @@ would contain the input. ### Returns -
    - **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** a square surrounding `bbox` - -
+**[BBox](https://tools.ietf.org/html/rfc7946#section-5)** a square surrounding `bbox` ### Examples ```javascript -var bbox = [-20, -20, -15, 0]; -var squared = turf.square(bbox); +const bbox = [-20, -20, -15, 0]; +const squared = turf.square(bbox); ``` export function Map0() { "use strict"; // jsdoc example start - var bbox = [-20, -20, -15, 0]; - var squared = turf.square(bbox); + const bbox = [-20, -20, -15, 0]; + const squared = turf.square(bbox); //addToMap - var addToMap = { - bbox: turf.bboxPolygon(bbox), - squared: turf.bboxPolygon(squared), - }; + const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/squareGrid.mdx b/docs/api/squareGrid.mdx index 5152b9c4..a4674ca2 100644 --- a/docs/api/squareGrid.mdx +++ b/docs/api/squareGrid.mdx @@ -4,29 +4,31 @@ title: squareGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Creates a square grid from a bounding box. +Creates a grid of square polygons with cell length consistent in degrees ### Parameters -| Name | Type | Description | -| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| bbox | **Array\** | extent in [minX, minY, maxX, maxY] order | -| cellSide | **number** | of each cell, in units | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | used in calculating cellSide, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.mask? | **[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)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | -| options.properties? | **Object** | passed to each point of the grid _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered. | +| cellSide | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | length of each cell side. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | the units of the cellSide value. Supports all valid Turf [Units](https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md). If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you. The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees. _(default 'kilometers')_ | +| options.mask? | **[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)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | passed to each point of the grid _(default \{\})_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** grid a grid of polygons - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a grid of polygons with equal width and height in degrees. ### Examples @@ -55,7 +57,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/standardDeviationalEllipse.mdx b/docs/api/standardDeviationalEllipse.mdx index f5254e1d..6a9026df 100644 --- a/docs/api/standardDeviationalEllipse.mdx +++ b/docs/api/standardDeviationalEllipse.mdx @@ -4,11 +4,16 @@ title: standardDeviationalEllipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a standard deviational ellipse, +Takes a collection of features and returns a standard deviational ellipse, also known as a “directional distribution.” The standard deviational ellipse aims to show the direction and the distribution of a dataset by drawing an ellipse that contains about one standard deviation’s worth (~ 70%) of the @@ -32,42 +37,38 @@ doi:\{@link [https://doi.org/10.1086/214336 \| 10.1086/214336\}](https://doi.org | Name | Type | Description | | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | GeoJSON points | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.weight? | **string** | the property name used to weight the center | -| options.steps? | **number** | number of steps for the polygon _(default 64)_ | -| options.properties? | **Object** | properties to pass to the resulting ellipse _(default \{\})_ | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.weight? | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | the property name used to weight the center | +| options.steps? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | number of steps for the polygon _(default 64)_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | properties to pass to the resulting ellipse _(default \{\})_ | ### Returns -
    - **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** an elliptical Polygon that includes approximately 1 SD of the dataset within it. - -
+**[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** an elliptical Polygon that includes approximately 1 SD of the dataset within it. ### Examples ```javascript -var bbox = [-74, 40.72, -73.98, 40.74]; -var points = turf.randomPoint(400, { bbox: bbox }); -var sdEllipse = turf.standardDeviationalEllipse(points); +const bbox = [-74, 40.72, -73.98, 40.74]; +const points = turf.randomPoint(400, { bbox: bbox }); +const sdEllipse = turf.standardDeviationalEllipse(points); ``` export function Map0() { "use strict"; // jsdoc example start - var bbox = [-74, 40.72, -73.98, 40.74]; - var points = turf.randomPoint(400, { bbox: bbox }); - var sdEllipse = turf.standardDeviationalEllipse(points); + const bbox = [-74, 40.72, -73.98, 40.74]; + const points = turf.randomPoint(400, { bbox: bbox }); + const sdEllipse = turf.standardDeviationalEllipse(points); //addToMap - var addToMap = { points, sdEllipse }; + const addToMap = [points, sdEllipse]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/tag.mdx b/docs/api/tag.mdx index 8bc0e3cb..27662a17 100644 --- a/docs/api/tag.mdx +++ b/docs/api/tag.mdx @@ -4,8 +4,13 @@ title: tag import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a set of [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) and/or [multipolygons](https://tools.ietf.org/html/rfc7946#section-3.1.7) and performs a spatial join. @@ -16,15 +21,12 @@ Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | input points | | polygons | **[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 (multi)polygons | -| field | **string** | property in `polygons` to add to joined \{\\} features | -| outField | **string** | property in `points` in which to store joined property from `polygons` | +| field | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | property in `polygons` to add to joined \{\\} features | +| outField | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | property in `points` in which to store joined property from `polygons` | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** points with `containingPolyId` property containing values from `polyId` - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** points with `containingPolyId` property containing values from `polyId` ### Examples @@ -105,7 +107,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/tesselate.mdx b/docs/api/tesselate.mdx index 17c67c88..a40ee910 100644 --- a/docs/api/tesselate.mdx +++ b/docs/api/tesselate.mdx @@ -4,30 +4,32 @@ title: tesselate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Tesselates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> into a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> of triangles +Tesselates a polygon or multipolygon into a collection of triangle polygons using [earcut](https://github.com/mapbox/earcut). ### Parameters -| Name | Type | Description | -| ---- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------ | -| poly | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | the polygon to tesselate | +| Name | Type | Description | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | +| poly | **[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)\>** | the polygon to tesselate | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a geometrycollection feature - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** collection of polygon tesselations ### Examples ```javascript -var poly = turf.polygon([ +const poly = turf.polygon([ [ [11, 0], [22, 4], @@ -38,14 +40,14 @@ var poly = turf.polygon([ [11, 0], ], ]); -var triangles = turf.tesselate(poly); +const triangles = turf.tesselate(poly); ``` export function Map0() { "use strict"; // jsdoc example start - var poly = turf.polygon([ + const poly = turf.polygon([ [ [11, 0], [22, 4], @@ -56,16 +58,15 @@ export function Map0() { [11, 0], ], ]); - var triangles = turf.tesselate(poly); + const triangles = turf.tesselate(poly); //addToMap - var addToMap = { poly, triangles }; + const addToMap = [poly, triangles]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/tin.mdx b/docs/api/tin.mdx index 92ae9c77..1a274cfd 100644 --- a/docs/api/tin.mdx +++ b/docs/api/tin.mdx @@ -4,8 +4,13 @@ title: tin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and creates a @@ -26,10 +31,7 @@ triangle. ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** TIN output - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** TIN output ### Examples @@ -68,7 +70,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/toMercator.mdx b/docs/api/toMercator.mdx index 184e5add..bee062b3 100644 --- a/docs/api/toMercator.mdx +++ b/docs/api/toMercator.mdx @@ -4,26 +4,28 @@ title: toMercator import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection ### Parameters -| Name | Type | Description | -| ---------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| Position** | WGS84 GeoJSON object | -| options? | **Object** | Optional parameters | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| Position** | WGS84 GeoJSON object | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** Projected GeoJSON - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** Projected GeoJSON ### Examples @@ -46,7 +48,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/toWgs84.mdx b/docs/api/toWgs84.mdx index 57b48b62..7fc8f6c7 100644 --- a/docs/api/toWgs84.mdx +++ b/docs/api/toWgs84.mdx @@ -4,26 +4,28 @@ title: toWgs84 import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection ### Parameters -| Name | Type | Description | -| ---------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| Position** | Mercator GeoJSON object | -| options? | **Object** | Optional parameters | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| Position** | Mercator GeoJSON object | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** Projected GeoJSON - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** Projected GeoJSON ### Examples @@ -46,7 +48,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/transformRotate.mdx b/docs/api/transformRotate.mdx index 11e1457f..9b065d2c 100644 --- a/docs/api/transformRotate.mdx +++ b/docs/api/transformRotate.mdx @@ -4,33 +4,35 @@ title: transformRotate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point. ### Parameters -| Name | Type | Description | -| ---------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | object to be rotated | -| angle | **number** | of rotation in decimal degrees, positive clockwise | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.pivot? | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point around which the rotation will be performed _(default 'centroid')_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | object to be rotated | +| angle | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | of rotation in decimal degrees, positive clockwise | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.pivot? | **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | point around which the rotation will be performed _(default 'centroid')_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** the rotated GeoJSON feature - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** the rotated GeoJSON feature ### Examples ```javascript -var poly = turf.polygon([ +const poly = turf.polygon([ [ [0, 29], [3.5, 29], @@ -38,15 +40,15 @@ var poly = turf.polygon([ [0, 29], ], ]); -var options = { pivot: [0, 25] }; -var rotatedPoly = turf.transformRotate(poly, 10, options); +const options = { pivot: [0, 25] }; +const rotatedPoly = turf.transformRotate(poly, 10, options); ``` export function Map0() { "use strict"; // jsdoc example start - var poly = turf.polygon([ + const poly = turf.polygon([ [ [0, 29], [3.5, 29], @@ -54,18 +56,17 @@ export function Map0() { [0, 29], ], ]); - var options = { pivot: [0, 25] }; - var rotatedPoly = turf.transformRotate(poly, 10, options); + const options = { pivot: [0, 25] }; + const rotatedPoly = turf.transformRotate(poly, 10, options); //addToMap - var addToMap = { poly, rotatedPoly }; + const addToMap = [poly, rotatedPoly]; rotatedPoly.properties = { stroke: "#F00", "stroke-width": 4 }; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/transformScale.mdx b/docs/api/transformScale.mdx index 035132b9..f8c80ebd 100644 --- a/docs/api/transformScale.mdx +++ b/docs/api/transformScale.mdx @@ -4,34 +4,38 @@ title: transformScale import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger). -If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature. +Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2 +would make each object 200% larger. +If a FeatureCollection is provided, the origin point will be calculated +based on each individual feature _unless_ an exact ### Parameters -| Name | Type | Description | -| ---------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | GeoJSON to be scaled | -| factor | **number** | of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson. | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.origin? | **string \| [Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid) _(default 'centroid')_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** | objects to be scaled | +| factor | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.origin? | **[Corners](docs/api/types/Corners.mdx) \| [Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** | Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid) _(default 'centroid')_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance improvement if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** scaled GeoJSON - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** scaled GeoJSON ### Examples ```javascript -var poly = turf.polygon([ +const poly = turf.polygon([ [ [0, 29], [3.5, 29], @@ -39,14 +43,14 @@ var poly = turf.polygon([ [0, 29], ], ]); -var scaledPoly = turf.transformScale(poly, 3); +const scaledPoly = turf.transformScale(poly, 3); ``` export function Map0() { "use strict"; // jsdoc example start - var poly = turf.polygon([ + const poly = turf.polygon([ [ [0, 29], [3.5, 29], @@ -54,17 +58,16 @@ export function Map0() { [0, 29], ], ]); - var scaledPoly = turf.transformScale(poly, 3); + const scaledPoly = turf.transformScale(poly, 3); //addToMap - var addToMap = { poly, scaledPoly }; + const addToMap = [poly, scaledPoly]; scaledPoly.properties = { stroke: "#F00", "stroke-width": 4 }; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/transformTranslate.mdx b/docs/api/transformTranslate.mdx index 397c1018..8936f98d 100644 --- a/docs/api/transformTranslate.mdx +++ b/docs/api/transformTranslate.mdx @@ -4,8 +4,13 @@ title: transformTranslate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line @@ -13,22 +18,19 @@ on the provided direction angle. ### Parameters -| Name | Type | Description | -| ---------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | object to be translated | -| distance | **number** | length of the motion; negative values determine motion in opposite direction | -| direction | **number** | of the motion; angle from North in decimal degrees, positive clockwise | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | in which `distance` will be express; miles, kilometers, degrees, or radians _(default 'kilometers')_ | -| options.zTranslation? | **number** | length of the vertical motion, same unit of distance _(default 0)_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** | object to be translated | +| distance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | length of the motion; negative values determine motion in opposite direction | +| direction | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | of the motion; angle from North in decimal degrees, positive clockwise | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | in which `distance` will be express; miles, kilometers, degrees, or radians _(default 'kilometers')_ | +| options.zTranslation? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | length of the vertical motion, same unit of distance _(default 0)_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** the translated GeoJSON object - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) \| [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)** the translated GeoJSON object ### Examples @@ -66,7 +68,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/triangleGrid.mdx b/docs/api/triangleGrid.mdx index ad93a530..b930600c 100644 --- a/docs/api/triangleGrid.mdx +++ b/docs/api/triangleGrid.mdx @@ -4,29 +4,31 @@ title: triangleGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a bounding box and a cell depth and returns a set of triangular [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) in a grid. +Creates a grid of triangular polygons. ### Parameters -| Name | Type | Description | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | -| bbox | **Array\** | extent in [minX, minY, maxX, maxY] order | -| cellSide | **number** | dimension of each cell | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.units? | **string** | used in calculating cellSide, can be degrees, radians, miles, or kilometers _(default 'kilometers')_ | -| options.mask? | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | -| options.properties? | **Object** | passed to each point of the grid _(default \{\})_ | +| Name | Type | Description | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| bbox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | extent of grid in [minX, minY, maxX, maxY] order | +| cellSide | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | dimension of each grid cell. Two triangles are created in each cell. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.units? | **[Units](docs/api/types/Units.mdx)** | used in calculating cellSide. Supports all valid Turf [Units](https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md) _(default 'kilometers')_ | +| options.mask? | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** | if passed a Polygon or MultiPolygon, the grid Points will be created only inside it | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | passed to each point of the grid _(default \{\})_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** grid of polygons - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** grid of polygons ### Examples @@ -55,7 +57,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/truncate.mdx b/docs/api/truncate.mdx index 74c6bd66..8930a90c 100644 --- a/docs/api/truncate.mdx +++ b/docs/api/truncate.mdx @@ -4,28 +4,30 @@ title: truncate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry. ### Parameters -| Name | Type | Description | -| --------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection. | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.precision? | **number** | coordinate decimal precision _(default 6)_ | -| options.coordinates? | **number** | maximum number of coordinates (primarly used to remove z coordinates) _(default 3)_ | -| options.mutate? | **boolean** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | +| Name | Type | Description | +| --------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| geojson | **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** | any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection. | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.precision? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | coordinate decimal precision _(default 6)_ | +| options.coordinates? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | maximum number of coordinates (primarly used to remove z coordinates) _(default 3)_ | +| options.mutate? | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | allows GeoJSON input to be mutated (significant performance increase if true) _(default false)_ | ### Returns -
    - **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** layer with truncated geometry - -
+**[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** layer with truncated geometry ### Examples @@ -52,7 +54,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/types/AllGeoJSON.mdx b/docs/api/types/AllGeoJSON.mdx new file mode 100644 index 00000000..d0d144f8 --- /dev/null +++ b/docs/api/types/AllGeoJSON.mdx @@ -0,0 +1,19 @@ +--- +title: AllGeoJSON +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Convenience type for all possible GeoJSON. + +### Definition + +[Feature](https://tools.ietf.org/html/rfc7946#section-3.2) | [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) | [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) | [GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8) diff --git a/docs/api/types/AreaUnits.mdx b/docs/api/types/AreaUnits.mdx new file mode 100644 index 00000000..2dd7650c --- /dev/null +++ b/docs/api/types/AreaUnits.mdx @@ -0,0 +1,19 @@ +--- +title: AreaUnits +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Area measurement units. + +### Definition + +Exclude\<[Units](docs/api/types/Units.mdx), "radians" | "degrees"\> | "acres" | "hectares" diff --git a/docs/api/types/Corners.mdx b/docs/api/types/Corners.mdx new file mode 100644 index 00000000..ae6fd6fe --- /dev/null +++ b/docs/api/types/Corners.mdx @@ -0,0 +1,19 @@ +--- +title: Corners +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Shorthand corner identifiers. + +### Definition + +"sw" | "se" | "nw" | "ne" | "center" | "centroid" diff --git a/docs/api/types/Dbscan.mdx b/docs/api/types/Dbscan.mdx new file mode 100644 index 00000000..01af9ffd --- /dev/null +++ b/docs/api/types/Dbscan.mdx @@ -0,0 +1,19 @@ +--- +title: Dbscan +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Point classification within the cluster. + +### Definition + +"core" | "edge" | "noise" diff --git a/docs/api/types/DbscanProps.mdx b/docs/api/types/DbscanProps.mdx new file mode 100644 index 00000000..628b6925 --- /dev/null +++ b/docs/api/types/DbscanProps.mdx @@ -0,0 +1,26 @@ +--- +title: DbscanProps +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Properties assigned to each clustered point. + +### Definition + +GeoJsonProperties & object \{ + +| Name | Type | Description | +| --------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------- | +| dbscan? | **[Dbscan](docs/api/types/Dbscan.mdx)** | type of point it has been classified as | +| cluster? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | associated clusterId | + +\} diff --git a/docs/api/types/DirectionalMeanLine.mdx b/docs/api/types/DirectionalMeanLine.mdx new file mode 100644 index 00000000..1090895b --- /dev/null +++ b/docs/api/types/DirectionalMeanLine.mdx @@ -0,0 +1,29 @@ +--- +title: DirectionalMeanLine +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +### Definition + +object \{ + +| Name | Type | Description | +| ---------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cartesianAngle | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the mean angle of all lines. (measure from due earth counterclockwise). | +| bearingAngle | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the mean angle of all lines. (bearing). | +| circularVariance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the extent to which features all point in the same direction. the value ranges 0-1, the bigger the value, the more variation in directions between lines. | +| averageX | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the centroid of all lines. | +| averageY | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the centroid of all line. | +| averageLength | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the average length of line. | +| countOfLines | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the count of features. | + +\} diff --git a/docs/api/types/Grid.mdx b/docs/api/types/Grid.mdx new file mode 100644 index 00000000..11cd2032 --- /dev/null +++ b/docs/api/types/Grid.mdx @@ -0,0 +1,19 @@ +--- +title: Grid +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Grid types. + +### Definition + +"point" | "square" | "hex" | "triangle" diff --git a/docs/api/types/Lines.mdx b/docs/api/types/Lines.mdx new file mode 100644 index 00000000..7d492a58 --- /dev/null +++ b/docs/api/types/Lines.mdx @@ -0,0 +1,19 @@ +--- +title: Lines +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Geometries made up of lines i.e. lines and polygons. + +### Definition + +[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) diff --git a/docs/api/types/MoranIndex.mdx b/docs/api/types/MoranIndex.mdx new file mode 100644 index 00000000..26e833c7 --- /dev/null +++ b/docs/api/types/MoranIndex.mdx @@ -0,0 +1,26 @@ +--- +title: MoranIndex +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +### Definition + +object \{ + +| Name | Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| moranIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the moran's Index of the observed feature set | +| expectedMoranIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the moran's Index of the random distribution | +| stdNorm | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the standard devitaion of the random distribution | +| zNorm | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | the z-score of the observe samples with regard to the random distribution | + +\} diff --git a/docs/api/types/NearestNeighborStatistics.mdx b/docs/api/types/NearestNeighborStatistics.mdx new file mode 100644 index 00000000..5158d92a --- /dev/null +++ b/docs/api/types/NearestNeighborStatistics.mdx @@ -0,0 +1,29 @@ +--- +title: NearestNeighborStatistics +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Nearest neighbour statistics. + +### Definition + +object \{ + +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ----------- | +| arealUnits | **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** | | +| observedMeanDistance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | +| expectedMeanDistance | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | +| numberOfPoints | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | +| zScore | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | + +\} diff --git a/docs/api/types/NearestNeighborStudyArea.mdx b/docs/api/types/NearestNeighborStudyArea.mdx new file mode 100644 index 00000000..802b33ec --- /dev/null +++ b/docs/api/types/NearestNeighborStudyArea.mdx @@ -0,0 +1,26 @@ +--- +title: NearestNeighborStudyArea +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Nearest neighbour study area polygon feature. + +### Definition + +object \{ + +| Name | Type | Description | +| ---------------------------------- | ----------------------------------------------------------------------------- | ----------- | +| properties | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | | +| properties.nearestNeighborAnalysis | **[NearestNeighborStatistics](docs/api/types/NearestNeighborStatistics.mdx)** | | + +\} diff --git a/docs/api/types/QuadratAnalysisResult.mdx b/docs/api/types/QuadratAnalysisResult.mdx new file mode 100644 index 00000000..8ae0a1f0 --- /dev/null +++ b/docs/api/types/QuadratAnalysisResult.mdx @@ -0,0 +1,28 @@ +--- +title: QuadratAnalysisResult +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +the return type of the quadratAnalysis + +### Definition + +object \{ + +| Name | Type | Description | +| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| criticalValue | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | +| maxAbsoluteDifference | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | | +| isRandom | **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** | | +| observedDistribution | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | the cumulative distribution of observed features, the index represents the number of features in the quadrat. | + +\} diff --git a/docs/api/types/Units.mdx b/docs/api/types/Units.mdx new file mode 100644 index 00000000..cabad58b --- /dev/null +++ b/docs/api/types/Units.mdx @@ -0,0 +1,19 @@ +--- +title: Units +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Linear measurement units. + +### Definition + +"meters" | "metres" | "millimeters" | "millimetres" | "centimeters" | "centimetres" | "kilometers" | "kilometres" | "miles" | "nauticalmiles" | "inches" | "yards" | "feet" | "radians" | "degrees" diff --git a/docs/api/types/clusterEachCallback.mdx b/docs/api/types/clusterEachCallback.mdx new file mode 100644 index 00000000..21b246e4 --- /dev/null +++ b/docs/api/types/clusterEachCallback.mdx @@ -0,0 +1,31 @@ +--- +title: clusterEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for clusterEach + +### Definition + +function ( + +| Name | Type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| cluster? | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | The current cluster being processed. | +| clusterValue? | **any** | Value used to create cluster being processed. | +| currentIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The index of the current element being processed in the array.Starts at index 0 | + +) + +### Returns + +**void** diff --git a/docs/api/types/clusterReduceCallback.mdx b/docs/api/types/clusterReduceCallback.mdx new file mode 100644 index 00000000..fa3170fc --- /dev/null +++ b/docs/api/types/clusterReduceCallback.mdx @@ -0,0 +1,45 @@ +--- +title: clusterReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for clusterReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| --------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| previousValue? | **\*** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| cluster? | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)** | The current cluster being processed. | +| clusterValue? | **\*** | Value used to create cluster being processed. | +| currentIndex? | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The index of the current element being processed in the array. Starts at index 0, if an initialValue is provided, and at index 1 otherwise. | + +) + +### Returns + +**void** diff --git a/docs/api/types/coordEachCallback.mdx b/docs/api/types/coordEachCallback.mdx new file mode 100644 index 00000000..b0e504b2 --- /dev/null +++ b/docs/api/types/coordEachCallback.mdx @@ -0,0 +1,33 @@ +--- +title: coordEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for coordEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| currentCoord | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | The current coordinate being processed. | +| coordIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the coordinate being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/coordReduceCallback.mdx b/docs/api/types/coordReduceCallback.mdx new file mode 100644 index 00000000..a00c11c2 --- /dev/null +++ b/docs/api/types/coordReduceCallback.mdx @@ -0,0 +1,47 @@ +--- +title: coordReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for coordReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentCoord | **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\>** | The current coordinate being processed. | +| coordIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the coordinate being processed. Starts at index 0, if an initialValue is provided, and at index 1 otherwise. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/featureEachCallback.mdx b/docs/api/types/featureEachCallback.mdx new file mode 100644 index 00000000..067b15a6 --- /dev/null +++ b/docs/api/types/featureEachCallback.mdx @@ -0,0 +1,30 @@ +--- +title: featureEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for featureEach + +### Definition + +function ( + +| Name | Type | Description | +| -------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | +| currentFeature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\** | The current Feature being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/featureReduceCallback.mdx b/docs/api/types/featureReduceCallback.mdx new file mode 100644 index 00000000..dc6c0c84 --- /dev/null +++ b/docs/api/types/featureReduceCallback.mdx @@ -0,0 +1,44 @@ +--- +title: featureReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for featureReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| -------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentFeature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Feature being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/flattenEachCallback.mdx b/docs/api/types/flattenEachCallback.mdx new file mode 100644 index 00000000..e362beb2 --- /dev/null +++ b/docs/api/types/flattenEachCallback.mdx @@ -0,0 +1,31 @@ +--- +title: flattenEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for flattenEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| currentFeature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current flattened feature being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/flattenReduceCallback.mdx b/docs/api/types/flattenReduceCallback.mdx new file mode 100644 index 00000000..2309eb63 --- /dev/null +++ b/docs/api/types/flattenReduceCallback.mdx @@ -0,0 +1,45 @@ +--- +title: flattenReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for flattenReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentFeature | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Feature being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/geomEachCallback.mdx b/docs/api/types/geomEachCallback.mdx new file mode 100644 index 00000000..526aaa35 --- /dev/null +++ b/docs/api/types/geomEachCallback.mdx @@ -0,0 +1,33 @@ +--- +title: geomEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for geomEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | +| currentGeometry | **[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1)** | The current Geometry being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| featureProperties | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Feature Properties being processed. | +| featureBBox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | The current Feature BBox being processed. | +| featureId | **Id** | The current Feature Id being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/geomReduceCallback.mdx b/docs/api/types/geomReduceCallback.mdx new file mode 100644 index 00000000..6c4f6e97 --- /dev/null +++ b/docs/api/types/geomReduceCallback.mdx @@ -0,0 +1,47 @@ +--- +title: geomReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for geomReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentGeometry | **[GeometryObject](https://tools.ietf.org/html/rfc7946#section-3.1)** | The current Geometry being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| featureProperties | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Feature Properties being processed. | +| featureBBox | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | The current Feature BBox being processed. | +| featureId | **Id** | The current Feature Id being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/lineEachCallback.mdx b/docs/api/types/lineEachCallback.mdx new file mode 100644 index 00000000..906cd199 --- /dev/null +++ b/docs/api/types/lineEachCallback.mdx @@ -0,0 +1,32 @@ +--- +title: lineEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for lineEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| currentLine | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | The current LineString \| LinearRing being processed | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed | + +) + +### Returns + +**void** diff --git a/docs/api/types/lineReduceCallback.mdx b/docs/api/types/lineReduceCallback.mdx new file mode 100644 index 00000000..215d46ff --- /dev/null +++ b/docs/api/types/lineReduceCallback.mdx @@ -0,0 +1,46 @@ +--- +title: lineReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for lineReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentLine | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | The current LineString \| LinearRing being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/propEachCallback.mdx b/docs/api/types/propEachCallback.mdx new file mode 100644 index 00000000..7bcc7954 --- /dev/null +++ b/docs/api/types/propEachCallback.mdx @@ -0,0 +1,30 @@ +--- +title: propEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for propEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | +| currentProperties | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Properties being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/propReduceCallback.mdx b/docs/api/types/propReduceCallback.mdx new file mode 100644 index 00000000..c285f9f8 --- /dev/null +++ b/docs/api/types/propReduceCallback.mdx @@ -0,0 +1,44 @@ +--- +title: propReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for propReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentProperties | **[GeoJsonProperties](https://tools.ietf.org/html/rfc7946#section-3.2)** | The current Properties being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/types/segmentEachCallback.mdx b/docs/api/types/segmentEachCallback.mdx new file mode 100644 index 00000000..a1b0d6ad --- /dev/null +++ b/docs/api/types/segmentEachCallback.mdx @@ -0,0 +1,33 @@ +--- +title: segmentEachCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for segmentEach + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| currentSegment | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | The current Segment being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed. | +| segmentIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Segment being processed. | + +) + +### Returns + +**void** diff --git a/docs/api/types/segmentReduceCallback.mdx b/docs/api/types/segmentReduceCallback.mdx new file mode 100644 index 00000000..7e42dd40 --- /dev/null +++ b/docs/api/types/segmentReduceCallback.mdx @@ -0,0 +1,47 @@ +--- +title: segmentReduceCallback +--- + +import * as turf from "turf-next"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; +import BrowserOnly from "@docusaurus/BrowserOnly"; + + + +{() => } + +### Description + +Callback for segmentReduce + +The first time the callback function is called, the values provided as arguments depend +on whether the reduce method has an initialValue argument. + +If an initialValue is provided to the reduce method: + +- The previousValue argument is initialValue. +- The currentValue argument is the value of the first element present in the array. + +If an initialValue is not provided: + +- The previousValue argument is the value of the first element present in the array. +- The currentValue argument is the value of the second element present in the array. + +### Definition + +function ( + +| Name | Type | Description | +| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| previousValue | **Reducer** | The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied. | +| currentSegment | **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)\>** | The current Segment being processed. | +| featureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Feature being processed. | +| multiFeatureIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Multi-Feature being processed. | +| geometryIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Geometry being processed. | +| segmentIndex | **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | The current index of the Segment being processed. | + +) + +### Returns + +**Reducer** diff --git a/docs/api/union.mdx b/docs/api/union.mdx index 87c24095..66c643c7 100644 --- a/docs/api/union.mdx +++ b/docs/api/union.mdx @@ -4,26 +4,29 @@ title: union import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6) and returns a combined polygon. If the input polygons are not contiguous, this function returns a [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature. ### Parameters -| 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? | **Object** | Optional Parameters _(default \{\})_ | -| options.properties? | **Object** | Translate Properties to output Feature _(default \{\})_ | +| 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)\>** | | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional Parameters _(default \{\})_ | +| options.properties? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Translate Properties to output Feature _(default \{\})_ | +| 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 | ### Returns -
    - **[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)\>** a combined [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature, or null if the inputs are empty - -
+**[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)\>** a combined [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature, or null if the inputs are empty ### Examples @@ -94,7 +97,6 @@ export function Map0() { return ; } - {() => } ### Installation diff --git a/docs/api/unkinkPolygon.mdx b/docs/api/unkinkPolygon.mdx index 3f966888..744ddf31 100644 --- a/docs/api/unkinkPolygon.mdx +++ b/docs/api/unkinkPolygon.mdx @@ -4,30 +4,34 @@ title: unkinkPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a kinked polygon and returns a feature collection of polygons that have no kinks. +Takes a kinked polygon and returns a feature collection of polygons that have +no kinks. + Uses [simplepolygon](https://github.com/mclaeysb/simplepolygon) internally. ### Parameters -| Name | Type | Description | -| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | -| geojson | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [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)\>** | GeoJSON Polygon or MultiPolygon | +| Name | Type | Description | +| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| geojson | **[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)\> \| [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)\> \| [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)** | polygons to unkink | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Unkinked polygons - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** Unkinked polygons ### Examples ```javascript -var poly = turf.polygon([ +const poly = turf.polygon([ [ [0, 0], [2, 0], @@ -37,14 +41,14 @@ var poly = turf.polygon([ ], ]); -var result = turf.unkinkPolygon(poly); +const result = turf.unkinkPolygon(poly); ``` export function Map0() { "use strict"; // jsdoc example start - var poly = turf.polygon([ + const poly = turf.polygon([ [ [0, 0], [2, 0], @@ -54,16 +58,15 @@ export function Map0() { ], ]); - var result = turf.unkinkPolygon(poly); + const result = turf.unkinkPolygon(poly); //addToMap - var addToMap = { poly, result }; + const addToMap = [poly, result]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/docs/api/voronoi.mdx b/docs/api/voronoi.mdx index d117af59..112fb926 100644 --- a/docs/api/voronoi.mdx +++ b/docs/api/voronoi.mdx @@ -4,58 +4,59 @@ title: voronoi import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description -Takes a FeatureCollection of points, and a bounding box, and returns a FeatureCollection +Takes a collection of points and a bounding box, and returns a collection of Voronoi polygons. The Voronoi algorithim used comes from the d3-voronoi package. ### Parameters -| Name | Type | Description | -| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | to find the Voronoi polygons around. | -| options? | **Object** | Optional parameters _(default \{\})_ | -| options.bbox? | **Array\** | clipping rectangle, in [minX, minY, maxX, MaxY] order. _(default [-180,-85,180,-85])_ | +| Name | Type | Description | +| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| points | **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)\>** | points around which to calculate the Voronoi polygons | +| options? | **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | Optional parameters _(default \{\})_ | +| options.bbox? | **[BBox](https://tools.ietf.org/html/rfc7946#section-5)** | clipping rectangle, in [minX, minY, maxX, MaxY] order _(default [-180,-85,180,-85])_ | ### Returns -
    - **[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a set of polygons, one per input point. - -
+**[FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\>** a set of polygons, one per input point ### Examples ```javascript -var options = { +const options = { bbox: [-70, 40, -60, 60], }; -var points = turf.randomPoint(100, options); -var voronoiPolygons = turf.voronoi(points, options); +const points = turf.randomPoint(100, options); +const voronoiPolygons = turf.voronoi(points, options); ``` export function Map0() { "use strict"; // jsdoc example start - var options = { + const options = { bbox: [-70, 40, -60, 60], }; - var points = turf.randomPoint(100, options); - var voronoiPolygons = turf.voronoi(points, options); + const points = turf.randomPoint(100, options); + const voronoiPolygons = turf.voronoi(points, options); //addToMap - var addToMap = { voronoiPolygons, points }; + const addToMap = [voronoiPolygons, points]; // jsdoc example end return ; } - {() => } ### Installation diff --git a/turf b/turf index 3d3a7917..3b5f94af 160000 --- a/turf +++ b/turf @@ -1 +1 @@ -Subproject commit 3d3a7917025fbabe191dbddbc89754b86f9c7739 +Subproject commit 3b5f94afedad294603b118262ba486b4469f51d7 From 5b0f37b371618fe45bf359ee0b7e67377d5d3351 Mon Sep 17 00:00:00 2001 From: James Beard Date: Fri, 25 Oct 2024 11:49:49 +1100 Subject: [PATCH 8/8] Back porting window.turf variable to archived documentation. --- versioned_docs/version-6.5.0/api/along.mdx | 5 +++++ versioned_docs/version-6.5.0/api/angle.mdx | 5 +++++ versioned_docs/version-6.5.0/api/area.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bbox.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bboxClip.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bboxPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bearing.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bearingToAzimuth.mdx | 5 +++++ versioned_docs/version-6.5.0/api/bezierSpline.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanClockwise.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanConcave.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanContains.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanCrosses.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanDisjoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanEqual.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanIntersects.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanOverlap.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanParallel.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanPointInPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanPointOnLine.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanTouches.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanValid.mdx | 5 +++++ versioned_docs/version-6.5.0/api/booleanWithin.mdx | 5 +++++ versioned_docs/version-6.5.0/api/buffer.mdx | 5 +++++ versioned_docs/version-6.5.0/api/center.mdx | 5 +++++ versioned_docs/version-6.5.0/api/centerMean.mdx | 5 +++++ versioned_docs/version-6.5.0/api/centerMedian.mdx | 5 +++++ versioned_docs/version-6.5.0/api/centerOfMass.mdx | 5 +++++ versioned_docs/version-6.5.0/api/centroid.mdx | 5 +++++ versioned_docs/version-6.5.0/api/circle.mdx | 5 +++++ versioned_docs/version-6.5.0/api/cleanCoords.mdx | 5 +++++ versioned_docs/version-6.5.0/api/clone.mdx | 5 +++++ versioned_docs/version-6.5.0/api/clusterEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/clusterReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/clustersDbscan.mdx | 5 +++++ versioned_docs/version-6.5.0/api/clustersKmeans.mdx | 5 +++++ versioned_docs/version-6.5.0/api/collect.mdx | 5 +++++ versioned_docs/version-6.5.0/api/collectionOf.mdx | 5 +++++ versioned_docs/version-6.5.0/api/combine.mdx | 5 +++++ versioned_docs/version-6.5.0/api/concave.mdx | 5 +++++ versioned_docs/version-6.5.0/api/containsNumber.mdx | 5 +++++ versioned_docs/version-6.5.0/api/convertArea.mdx | 5 +++++ versioned_docs/version-6.5.0/api/convertLength.mdx | 5 +++++ versioned_docs/version-6.5.0/api/convex.mdx | 5 +++++ versioned_docs/version-6.5.0/api/coordAll.mdx | 5 +++++ versioned_docs/version-6.5.0/api/coordEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/coordReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/degreesToRadians.mdx | 5 +++++ versioned_docs/version-6.5.0/api/destination.mdx | 5 +++++ versioned_docs/version-6.5.0/api/difference.mdx | 5 +++++ versioned_docs/version-6.5.0/api/directionalMean.mdx | 5 +++++ versioned_docs/version-6.5.0/api/dissolve.mdx | 5 +++++ versioned_docs/version-6.5.0/api/distance.mdx | 5 +++++ versioned_docs/version-6.5.0/api/distanceWeight.mdx | 5 +++++ versioned_docs/version-6.5.0/api/ellipse.mdx | 5 +++++ versioned_docs/version-6.5.0/api/envelope.mdx | 5 +++++ versioned_docs/version-6.5.0/api/explode.mdx | 5 +++++ versioned_docs/version-6.5.0/api/feature.mdx | 5 +++++ versioned_docs/version-6.5.0/api/featureCollection.mdx | 5 +++++ versioned_docs/version-6.5.0/api/featureEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/featureOf.mdx | 5 +++++ versioned_docs/version-6.5.0/api/featureReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/findPoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/findSegment.mdx | 5 +++++ versioned_docs/version-6.5.0/api/flatten.mdx | 5 +++++ versioned_docs/version-6.5.0/api/flattenEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/flattenReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/flip.mdx | 5 +++++ versioned_docs/version-6.5.0/api/geojsonType.mdx | 5 +++++ versioned_docs/version-6.5.0/api/geomEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/geomReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/geometry.mdx | 5 +++++ versioned_docs/version-6.5.0/api/geometryCollection.mdx | 5 +++++ versioned_docs/version-6.5.0/api/getCluster.mdx | 5 +++++ versioned_docs/version-6.5.0/api/getCoord.mdx | 5 +++++ versioned_docs/version-6.5.0/api/getCoords.mdx | 5 +++++ versioned_docs/version-6.5.0/api/getGeom.mdx | 5 +++++ versioned_docs/version-6.5.0/api/getType.mdx | 5 +++++ versioned_docs/version-6.5.0/api/greatCircle.mdx | 5 +++++ versioned_docs/version-6.5.0/api/hexGrid.mdx | 5 +++++ versioned_docs/version-6.5.0/api/interpolate.mdx | 5 +++++ versioned_docs/version-6.5.0/api/intersect.mdx | 5 +++++ versioned_docs/version-6.5.0/api/isNumber.mdx | 5 +++++ versioned_docs/version-6.5.0/api/isObject.mdx | 5 +++++ versioned_docs/version-6.5.0/api/isobands.mdx | 5 +++++ versioned_docs/version-6.5.0/api/isolines.mdx | 5 +++++ versioned_docs/version-6.5.0/api/kinks.mdx | 5 +++++ versioned_docs/version-6.5.0/api/length.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lengthToDegrees.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lengthToRadians.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineArc.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineChunk.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineIntersect.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineOffset.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineOverlap.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineSegment.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineSlice.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineSliceAlong.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineSplit.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineString.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineStrings.mdx | 5 +++++ versioned_docs/version-6.5.0/api/lineToPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/mask.mdx | 5 +++++ versioned_docs/version-6.5.0/api/mean.mdx | 5 +++++ versioned_docs/version-6.5.0/api/midpoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/moranIndex.mdx | 5 +++++ versioned_docs/version-6.5.0/api/multiLineString.mdx | 5 +++++ versioned_docs/version-6.5.0/api/multiPoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/multiPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/nearestPoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/nearestPointOnLine.mdx | 5 +++++ versioned_docs/version-6.5.0/api/nearestPointToLine.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pNormDistance.mdx | 5 +++++ versioned_docs/version-6.5.0/api/planepoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/point.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pointGrid.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pointOnFeature.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pointToLineDistance.mdx | 5 +++++ versioned_docs/version-6.5.0/api/points.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pointsWithinPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygonSmooth.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygonTangents.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygonToLine.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygonize.mdx | 5 +++++ versioned_docs/version-6.5.0/api/polygons.mdx | 5 +++++ versioned_docs/version-6.5.0/api/propEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/propReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/pt.mdx | 5 +++++ versioned_docs/version-6.5.0/api/quadratAnalysis.mdx | 5 +++++ versioned_docs/version-6.5.0/api/radiansToDegrees.mdx | 5 +++++ versioned_docs/version-6.5.0/api/radiansToLength.mdx | 5 +++++ versioned_docs/version-6.5.0/api/randomLineString.mdx | 5 +++++ versioned_docs/version-6.5.0/api/randomPoint.mdx | 5 +++++ versioned_docs/version-6.5.0/api/randomPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/randomPosition.mdx | 5 +++++ versioned_docs/version-6.5.0/api/rewind.mdx | 5 +++++ versioned_docs/version-6.5.0/api/rhumbBearing.mdx | 5 +++++ versioned_docs/version-6.5.0/api/rhumbDestination.mdx | 5 +++++ versioned_docs/version-6.5.0/api/rhumbDistance.mdx | 5 +++++ versioned_docs/version-6.5.0/api/round.mdx | 5 +++++ versioned_docs/version-6.5.0/api/sample.mdx | 5 +++++ versioned_docs/version-6.5.0/api/sector.mdx | 5 +++++ versioned_docs/version-6.5.0/api/segmentEach.mdx | 5 +++++ versioned_docs/version-6.5.0/api/segmentReduce.mdx | 5 +++++ versioned_docs/version-6.5.0/api/shortestPath.mdx | 5 +++++ versioned_docs/version-6.5.0/api/simplify.mdx | 5 +++++ versioned_docs/version-6.5.0/api/square.mdx | 5 +++++ versioned_docs/version-6.5.0/api/squareGrid.mdx | 5 +++++ .../version-6.5.0/api/standardDeviationalEllipse.mdx | 5 +++++ versioned_docs/version-6.5.0/api/tag.mdx | 5 +++++ versioned_docs/version-6.5.0/api/tesselate.mdx | 5 +++++ versioned_docs/version-6.5.0/api/tin.mdx | 5 +++++ versioned_docs/version-6.5.0/api/toMercator.mdx | 5 +++++ versioned_docs/version-6.5.0/api/toWgs84.mdx | 5 +++++ versioned_docs/version-6.5.0/api/transformRotate.mdx | 5 +++++ versioned_docs/version-6.5.0/api/transformScale.mdx | 5 +++++ versioned_docs/version-6.5.0/api/transformTranslate.mdx | 5 +++++ versioned_docs/version-6.5.0/api/triangleGrid.mdx | 5 +++++ versioned_docs/version-6.5.0/api/truncate.mdx | 5 +++++ versioned_docs/version-6.5.0/api/union.mdx | 5 +++++ versioned_docs/version-6.5.0/api/unkinkPolygon.mdx | 5 +++++ versioned_docs/version-6.5.0/api/variance.mdx | 5 +++++ versioned_docs/version-6.5.0/api/voronoi.mdx | 5 +++++ versioned_docs/version-7.0.0/api/along.mdx | 5 +++++ versioned_docs/version-7.0.0/api/angle.mdx | 5 +++++ versioned_docs/version-7.0.0/api/area.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bbox.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bboxClip.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bboxPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bearing.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bearingToAzimuth.mdx | 5 +++++ versioned_docs/version-7.0.0/api/bezierSpline.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanClockwise.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanConcave.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanContains.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanCrosses.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanDisjoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanEqual.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanIntersects.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanOverlap.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanParallel.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanPointInPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanPointOnLine.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanTouches.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanValid.mdx | 5 +++++ versioned_docs/version-7.0.0/api/booleanWithin.mdx | 5 +++++ versioned_docs/version-7.0.0/api/buffer.mdx | 5 +++++ versioned_docs/version-7.0.0/api/center.mdx | 5 +++++ versioned_docs/version-7.0.0/api/centerMean.mdx | 5 +++++ versioned_docs/version-7.0.0/api/centerMedian.mdx | 5 +++++ versioned_docs/version-7.0.0/api/centerOfMass.mdx | 5 +++++ versioned_docs/version-7.0.0/api/centroid.mdx | 5 +++++ versioned_docs/version-7.0.0/api/circle.mdx | 5 +++++ versioned_docs/version-7.0.0/api/cleanCoords.mdx | 5 +++++ versioned_docs/version-7.0.0/api/clone.mdx | 5 +++++ versioned_docs/version-7.0.0/api/clusterEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/clusterReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/clustersDbscan.mdx | 5 +++++ versioned_docs/version-7.0.0/api/clustersKmeans.mdx | 5 +++++ versioned_docs/version-7.0.0/api/collect.mdx | 5 +++++ versioned_docs/version-7.0.0/api/collectionOf.mdx | 5 +++++ versioned_docs/version-7.0.0/api/combine.mdx | 5 +++++ versioned_docs/version-7.0.0/api/concave.mdx | 5 +++++ versioned_docs/version-7.0.0/api/containsNumber.mdx | 5 +++++ versioned_docs/version-7.0.0/api/convertArea.mdx | 5 +++++ versioned_docs/version-7.0.0/api/convertLength.mdx | 5 +++++ versioned_docs/version-7.0.0/api/convex.mdx | 5 +++++ versioned_docs/version-7.0.0/api/coordAll.mdx | 5 +++++ versioned_docs/version-7.0.0/api/coordEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/coordReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/degreesToRadians.mdx | 5 +++++ versioned_docs/version-7.0.0/api/destination.mdx | 5 +++++ versioned_docs/version-7.0.0/api/difference.mdx | 5 +++++ versioned_docs/version-7.0.0/api/directionalMean.mdx | 5 +++++ versioned_docs/version-7.0.0/api/dissolve.mdx | 5 +++++ versioned_docs/version-7.0.0/api/distance.mdx | 5 +++++ versioned_docs/version-7.0.0/api/distanceWeight.mdx | 5 +++++ versioned_docs/version-7.0.0/api/ellipse.mdx | 5 +++++ versioned_docs/version-7.0.0/api/envelope.mdx | 5 +++++ versioned_docs/version-7.0.0/api/explode.mdx | 5 +++++ versioned_docs/version-7.0.0/api/feature.mdx | 5 +++++ versioned_docs/version-7.0.0/api/featureCollection.mdx | 5 +++++ versioned_docs/version-7.0.0/api/featureEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/featureOf.mdx | 5 +++++ versioned_docs/version-7.0.0/api/featureReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/findPoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/findSegment.mdx | 5 +++++ versioned_docs/version-7.0.0/api/flatten.mdx | 5 +++++ versioned_docs/version-7.0.0/api/flattenEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/flattenReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/flip.mdx | 5 +++++ versioned_docs/version-7.0.0/api/geojsonType.mdx | 5 +++++ versioned_docs/version-7.0.0/api/geomEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/geomReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/geometry.mdx | 5 +++++ versioned_docs/version-7.0.0/api/geometryCollection.mdx | 5 +++++ versioned_docs/version-7.0.0/api/getCluster.mdx | 5 +++++ versioned_docs/version-7.0.0/api/getCoord.mdx | 5 +++++ versioned_docs/version-7.0.0/api/getCoords.mdx | 5 +++++ versioned_docs/version-7.0.0/api/getGeom.mdx | 5 +++++ versioned_docs/version-7.0.0/api/getType.mdx | 5 +++++ versioned_docs/version-7.0.0/api/greatCircle.mdx | 5 +++++ versioned_docs/version-7.0.0/api/hexGrid.mdx | 5 +++++ versioned_docs/version-7.0.0/api/interpolate.mdx | 5 +++++ versioned_docs/version-7.0.0/api/intersect.mdx | 5 +++++ versioned_docs/version-7.0.0/api/isNumber.mdx | 5 +++++ versioned_docs/version-7.0.0/api/isObject.mdx | 5 +++++ versioned_docs/version-7.0.0/api/isobands.mdx | 5 +++++ versioned_docs/version-7.0.0/api/isolines.mdx | 5 +++++ versioned_docs/version-7.0.0/api/kinks.mdx | 5 +++++ versioned_docs/version-7.0.0/api/length.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lengthToDegrees.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lengthToRadians.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineArc.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineChunk.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineIntersect.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineOffset.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineOverlap.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineSegment.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineSlice.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineSliceAlong.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineSplit.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineString.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineStrings.mdx | 5 +++++ versioned_docs/version-7.0.0/api/lineToPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/mask.mdx | 5 +++++ versioned_docs/version-7.0.0/api/mean.mdx | 5 +++++ versioned_docs/version-7.0.0/api/midpoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/moranIndex.mdx | 5 +++++ versioned_docs/version-7.0.0/api/multiLineString.mdx | 5 +++++ versioned_docs/version-7.0.0/api/multiPoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/multiPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/nearestPoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/nearestPointOnLine.mdx | 5 +++++ versioned_docs/version-7.0.0/api/nearestPointToLine.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pNormDistance.mdx | 5 +++++ versioned_docs/version-7.0.0/api/planepoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/point.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pointGrid.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pointOnFeature.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pointToLineDistance.mdx | 5 +++++ versioned_docs/version-7.0.0/api/points.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pointsWithinPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygonSmooth.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygonTangents.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygonToLine.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygonize.mdx | 5 +++++ versioned_docs/version-7.0.0/api/polygons.mdx | 5 +++++ versioned_docs/version-7.0.0/api/propEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/propReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/pt.mdx | 5 +++++ versioned_docs/version-7.0.0/api/quadratAnalysis.mdx | 5 +++++ versioned_docs/version-7.0.0/api/radiansToDegrees.mdx | 5 +++++ versioned_docs/version-7.0.0/api/radiansToLength.mdx | 5 +++++ versioned_docs/version-7.0.0/api/randomLineString.mdx | 5 +++++ versioned_docs/version-7.0.0/api/randomPoint.mdx | 5 +++++ versioned_docs/version-7.0.0/api/randomPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/randomPosition.mdx | 5 +++++ versioned_docs/version-7.0.0/api/rbush.mdx | 5 +++++ versioned_docs/version-7.0.0/api/rewind.mdx | 5 +++++ versioned_docs/version-7.0.0/api/rhumbBearing.mdx | 5 +++++ versioned_docs/version-7.0.0/api/rhumbDestination.mdx | 5 +++++ versioned_docs/version-7.0.0/api/rhumbDistance.mdx | 5 +++++ versioned_docs/version-7.0.0/api/round.mdx | 5 +++++ versioned_docs/version-7.0.0/api/sample.mdx | 5 +++++ versioned_docs/version-7.0.0/api/sector.mdx | 5 +++++ versioned_docs/version-7.0.0/api/segmentEach.mdx | 5 +++++ versioned_docs/version-7.0.0/api/segmentReduce.mdx | 5 +++++ versioned_docs/version-7.0.0/api/shortestPath.mdx | 5 +++++ versioned_docs/version-7.0.0/api/simplify.mdx | 5 +++++ versioned_docs/version-7.0.0/api/square.mdx | 5 +++++ versioned_docs/version-7.0.0/api/squareGrid.mdx | 5 +++++ .../version-7.0.0/api/standardDeviationalEllipse.mdx | 5 +++++ versioned_docs/version-7.0.0/api/tag.mdx | 5 +++++ versioned_docs/version-7.0.0/api/tesselate.mdx | 5 +++++ versioned_docs/version-7.0.0/api/tin.mdx | 5 +++++ versioned_docs/version-7.0.0/api/toMercator.mdx | 5 +++++ versioned_docs/version-7.0.0/api/toWgs84.mdx | 5 +++++ versioned_docs/version-7.0.0/api/transformRotate.mdx | 5 +++++ versioned_docs/version-7.0.0/api/transformScale.mdx | 5 +++++ versioned_docs/version-7.0.0/api/transformTranslate.mdx | 5 +++++ versioned_docs/version-7.0.0/api/triangleGrid.mdx | 5 +++++ versioned_docs/version-7.0.0/api/truncate.mdx | 5 +++++ versioned_docs/version-7.0.0/api/union.mdx | 5 +++++ versioned_docs/version-7.0.0/api/unkinkPolygon.mdx | 5 +++++ versioned_docs/version-7.0.0/api/variance.mdx | 5 +++++ versioned_docs/version-7.0.0/api/voronoi.mdx | 5 +++++ versioned_docs/version-7.1.0/api/along.mdx | 5 +++++ versioned_docs/version-7.1.0/api/angle.mdx | 5 +++++ versioned_docs/version-7.1.0/api/area.mdx | 5 +++++ versioned_docs/version-7.1.0/api/azimuthToBearing.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bbox.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bboxClip.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bboxPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bearing.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bearingToAzimuth.mdx | 5 +++++ versioned_docs/version-7.1.0/api/bezierSpline.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanClockwise.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanConcave.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanContains.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanCrosses.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanDisjoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanEqual.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanIntersects.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanOverlap.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanParallel.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanPointInPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanPointOnLine.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanTouches.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanValid.mdx | 5 +++++ versioned_docs/version-7.1.0/api/booleanWithin.mdx | 5 +++++ versioned_docs/version-7.1.0/api/buffer.mdx | 5 +++++ versioned_docs/version-7.1.0/api/center.mdx | 5 +++++ versioned_docs/version-7.1.0/api/centerMean.mdx | 5 +++++ versioned_docs/version-7.1.0/api/centerMedian.mdx | 5 +++++ versioned_docs/version-7.1.0/api/centerOfMass.mdx | 5 +++++ versioned_docs/version-7.1.0/api/centroid.mdx | 5 +++++ versioned_docs/version-7.1.0/api/circle.mdx | 5 +++++ versioned_docs/version-7.1.0/api/cleanCoords.mdx | 5 +++++ versioned_docs/version-7.1.0/api/clone.mdx | 5 +++++ versioned_docs/version-7.1.0/api/clusterEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/clusterReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/clustersDbscan.mdx | 5 +++++ versioned_docs/version-7.1.0/api/clustersKmeans.mdx | 5 +++++ versioned_docs/version-7.1.0/api/collect.mdx | 5 +++++ versioned_docs/version-7.1.0/api/collectionOf.mdx | 5 +++++ versioned_docs/version-7.1.0/api/combine.mdx | 5 +++++ versioned_docs/version-7.1.0/api/concave.mdx | 5 +++++ versioned_docs/version-7.1.0/api/containsNumber.mdx | 5 +++++ versioned_docs/version-7.1.0/api/convertArea.mdx | 5 +++++ versioned_docs/version-7.1.0/api/convertLength.mdx | 5 +++++ versioned_docs/version-7.1.0/api/convex.mdx | 5 +++++ versioned_docs/version-7.1.0/api/coordAll.mdx | 5 +++++ versioned_docs/version-7.1.0/api/coordEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/coordReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/degreesToRadians.mdx | 5 +++++ versioned_docs/version-7.1.0/api/destination.mdx | 5 +++++ versioned_docs/version-7.1.0/api/difference.mdx | 5 +++++ versioned_docs/version-7.1.0/api/directionalMean.mdx | 5 +++++ versioned_docs/version-7.1.0/api/dissolve.mdx | 5 +++++ versioned_docs/version-7.1.0/api/distance.mdx | 5 +++++ versioned_docs/version-7.1.0/api/distanceWeight.mdx | 5 +++++ versioned_docs/version-7.1.0/api/ellipse.mdx | 5 +++++ versioned_docs/version-7.1.0/api/envelope.mdx | 5 +++++ versioned_docs/version-7.1.0/api/explode.mdx | 5 +++++ versioned_docs/version-7.1.0/api/feature.mdx | 5 +++++ versioned_docs/version-7.1.0/api/featureCollection.mdx | 5 +++++ versioned_docs/version-7.1.0/api/featureEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/featureOf.mdx | 5 +++++ versioned_docs/version-7.1.0/api/featureReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/findPoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/findSegment.mdx | 5 +++++ versioned_docs/version-7.1.0/api/flatten.mdx | 5 +++++ versioned_docs/version-7.1.0/api/flattenEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/flattenReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/flip.mdx | 5 +++++ versioned_docs/version-7.1.0/api/geojsonType.mdx | 5 +++++ versioned_docs/version-7.1.0/api/geomEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/geomReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/geometry.mdx | 5 +++++ versioned_docs/version-7.1.0/api/geometryCollection.mdx | 5 +++++ versioned_docs/version-7.1.0/api/getCluster.mdx | 5 +++++ versioned_docs/version-7.1.0/api/getCoord.mdx | 5 +++++ versioned_docs/version-7.1.0/api/getCoords.mdx | 5 +++++ versioned_docs/version-7.1.0/api/getGeom.mdx | 5 +++++ versioned_docs/version-7.1.0/api/getType.mdx | 5 +++++ versioned_docs/version-7.1.0/api/greatCircle.mdx | 5 +++++ versioned_docs/version-7.1.0/api/hexGrid.mdx | 5 +++++ versioned_docs/version-7.1.0/api/interpolate.mdx | 5 +++++ versioned_docs/version-7.1.0/api/intersect.mdx | 5 +++++ versioned_docs/version-7.1.0/api/isNumber.mdx | 5 +++++ versioned_docs/version-7.1.0/api/isObject.mdx | 5 +++++ versioned_docs/version-7.1.0/api/isobands.mdx | 5 +++++ versioned_docs/version-7.1.0/api/isolines.mdx | 5 +++++ versioned_docs/version-7.1.0/api/kinks.mdx | 5 +++++ versioned_docs/version-7.1.0/api/length.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lengthToDegrees.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lengthToRadians.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineArc.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineChunk.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineIntersect.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineOffset.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineOverlap.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineSegment.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineSlice.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineSliceAlong.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineSplit.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineString.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineStrings.mdx | 5 +++++ versioned_docs/version-7.1.0/api/lineToPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/mask.mdx | 5 +++++ versioned_docs/version-7.1.0/api/mean.mdx | 5 +++++ versioned_docs/version-7.1.0/api/midpoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/moranIndex.mdx | 5 +++++ versioned_docs/version-7.1.0/api/multiLineString.mdx | 5 +++++ versioned_docs/version-7.1.0/api/multiPoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/multiPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/nearestPoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/nearestPointOnLine.mdx | 5 +++++ versioned_docs/version-7.1.0/api/nearestPointToLine.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pNormDistance.mdx | 5 +++++ versioned_docs/version-7.1.0/api/planepoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/point.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pointGrid.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pointOnFeature.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pointToLineDistance.mdx | 5 +++++ versioned_docs/version-7.1.0/api/points.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pointsWithinPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygonSmooth.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygonTangents.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygonToLine.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygonize.mdx | 5 +++++ versioned_docs/version-7.1.0/api/polygons.mdx | 5 +++++ versioned_docs/version-7.1.0/api/propEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/propReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/pt.mdx | 5 +++++ versioned_docs/version-7.1.0/api/quadratAnalysis.mdx | 5 +++++ versioned_docs/version-7.1.0/api/radiansToDegrees.mdx | 5 +++++ versioned_docs/version-7.1.0/api/radiansToLength.mdx | 5 +++++ versioned_docs/version-7.1.0/api/randomLineString.mdx | 5 +++++ versioned_docs/version-7.1.0/api/randomPoint.mdx | 5 +++++ versioned_docs/version-7.1.0/api/randomPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/randomPosition.mdx | 5 +++++ versioned_docs/version-7.1.0/api/rbush.mdx | 5 +++++ versioned_docs/version-7.1.0/api/rewind.mdx | 5 +++++ versioned_docs/version-7.1.0/api/rhumbBearing.mdx | 5 +++++ versioned_docs/version-7.1.0/api/rhumbDestination.mdx | 5 +++++ versioned_docs/version-7.1.0/api/rhumbDistance.mdx | 5 +++++ versioned_docs/version-7.1.0/api/round.mdx | 5 +++++ versioned_docs/version-7.1.0/api/sample.mdx | 5 +++++ versioned_docs/version-7.1.0/api/sector.mdx | 5 +++++ versioned_docs/version-7.1.0/api/segmentEach.mdx | 5 +++++ versioned_docs/version-7.1.0/api/segmentReduce.mdx | 5 +++++ versioned_docs/version-7.1.0/api/shortestPath.mdx | 5 +++++ versioned_docs/version-7.1.0/api/simplify.mdx | 5 +++++ versioned_docs/version-7.1.0/api/square.mdx | 5 +++++ versioned_docs/version-7.1.0/api/squareGrid.mdx | 5 +++++ .../version-7.1.0/api/standardDeviationalEllipse.mdx | 5 +++++ versioned_docs/version-7.1.0/api/tag.mdx | 5 +++++ versioned_docs/version-7.1.0/api/tesselate.mdx | 5 +++++ versioned_docs/version-7.1.0/api/tin.mdx | 5 +++++ versioned_docs/version-7.1.0/api/toMercator.mdx | 5 +++++ versioned_docs/version-7.1.0/api/toWgs84.mdx | 5 +++++ versioned_docs/version-7.1.0/api/transformRotate.mdx | 5 +++++ versioned_docs/version-7.1.0/api/transformScale.mdx | 5 +++++ versioned_docs/version-7.1.0/api/transformTranslate.mdx | 5 +++++ versioned_docs/version-7.1.0/api/triangleGrid.mdx | 5 +++++ versioned_docs/version-7.1.0/api/truncate.mdx | 5 +++++ versioned_docs/version-7.1.0/api/union.mdx | 5 +++++ versioned_docs/version-7.1.0/api/unkinkPolygon.mdx | 5 +++++ versioned_docs/version-7.1.0/api/variance.mdx | 5 +++++ versioned_docs/version-7.1.0/api/voronoi.mdx | 5 +++++ 501 files changed, 2505 insertions(+) diff --git a/versioned_docs/version-6.5.0/api/along.mdx b/versioned_docs/version-6.5.0/api/along.mdx index e77e86b3..85a45eab 100644 --- a/versioned_docs/version-6.5.0/api/along.mdx +++ b/versioned_docs/version-6.5.0/api/along.mdx @@ -4,8 +4,13 @@ title: along import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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. diff --git a/versioned_docs/version-6.5.0/api/angle.mdx b/versioned_docs/version-6.5.0/api/angle.mdx index 46b76462..7c8b8103 100644 --- a/versioned_docs/version-6.5.0/api/angle.mdx +++ b/versioned_docs/version-6.5.0/api/angle.mdx @@ -4,8 +4,13 @@ title: angle import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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) diff --git a/versioned_docs/version-6.5.0/api/area.mdx b/versioned_docs/version-6.5.0/api/area.mdx index 4de5c77a..7d73b7df 100644 --- a/versioned_docs/version-6.5.0/api/area.mdx +++ b/versioned_docs/version-6.5.0/api/area.mdx @@ -4,8 +4,13 @@ title: area import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more features and returns their area in square meters. diff --git a/versioned_docs/version-6.5.0/api/bbox.mdx b/versioned_docs/version-6.5.0/api/bbox.mdx index d1234aac..34b61b60 100644 --- a/versioned_docs/version-6.5.0/api/bbox.mdx +++ b/versioned_docs/version-6.5.0/api/bbox.mdx @@ -4,8 +4,13 @@ title: bbox import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of features, calculates the bbox of all input features, and returns a bounding box. diff --git a/versioned_docs/version-6.5.0/api/bboxClip.mdx b/versioned_docs/version-6.5.0/api/bboxClip.mdx index f3bd075d..414eb172 100644 --- a/versioned_docs/version-6.5.0/api/bboxClip.mdx +++ b/versioned_docs/version-6.5.0/api/bboxClip.mdx @@ -4,8 +4,13 @@ title: bboxClip import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) and a bbox and clips the feature to the bbox using diff --git a/versioned_docs/version-6.5.0/api/bboxPolygon.mdx b/versioned_docs/version-6.5.0/api/bboxPolygon.mdx index af403d30..cf1a8ceb 100644 --- a/versioned_docs/version-6.5.0/api/bboxPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/bboxPolygon.mdx @@ -4,8 +4,13 @@ title: bboxPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bbox and returns an equivalent [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-6.5.0/api/bearing.mdx b/versioned_docs/version-6.5.0/api/bearing.mdx index 48be87d3..74821f81 100644 --- a/versioned_docs/version-6.5.0/api/bearing.mdx +++ b/versioned_docs/version-6.5.0/api/bearing.mdx @@ -4,8 +4,13 @@ title: bearing import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the geographic bearing between them, diff --git a/versioned_docs/version-6.5.0/api/bearingToAzimuth.mdx b/versioned_docs/version-6.5.0/api/bearingToAzimuth.mdx index 3b5a568d..b1309c30 100644 --- a/versioned_docs/version-6.5.0/api/bearingToAzimuth.mdx +++ b/versioned_docs/version-6.5.0/api/bearingToAzimuth.mdx @@ -4,8 +4,13 @@ title: bearingToAzimuth import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts any bearing angle from the north line direction (positive clockwise) diff --git a/versioned_docs/version-6.5.0/api/bezierSpline.mdx b/versioned_docs/version-6.5.0/api/bezierSpline.mdx index d939d81d..e6cb8e09 100644 --- a/versioned_docs/version-6.5.0/api/bezierSpline.mdx +++ b/versioned_docs/version-6.5.0/api/bezierSpline.mdx @@ -4,8 +4,13 @@ title: bezierSpline import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a curved version diff --git a/versioned_docs/version-6.5.0/api/booleanClockwise.mdx b/versioned_docs/version-6.5.0/api/booleanClockwise.mdx index 2d987ef6..8e154794 100644 --- a/versioned_docs/version-6.5.0/api/booleanClockwise.mdx +++ b/versioned_docs/version-6.5.0/api/booleanClockwise.mdx @@ -4,8 +4,13 @@ title: booleanClockwise import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise. diff --git a/versioned_docs/version-6.5.0/api/booleanConcave.mdx b/versioned_docs/version-6.5.0/api/booleanConcave.mdx index c8a3625c..034397d6 100644 --- a/versioned_docs/version-6.5.0/api/booleanConcave.mdx +++ b/versioned_docs/version-6.5.0/api/booleanConcave.mdx @@ -4,8 +4,13 @@ title: booleanConcave import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a polygon and return true or false as to whether it is concave or not. diff --git a/versioned_docs/version-6.5.0/api/booleanContains.mdx b/versioned_docs/version-6.5.0/api/booleanContains.mdx index 814d17e8..617d9457 100644 --- a/versioned_docs/version-6.5.0/api/booleanContains.mdx +++ b/versioned_docs/version-6.5.0/api/booleanContains.mdx @@ -4,8 +4,13 @@ title: booleanContains import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-contains returns True if the second geometry is completely contained by the first geometry. diff --git a/versioned_docs/version-6.5.0/api/booleanCrosses.mdx b/versioned_docs/version-6.5.0/api/booleanCrosses.mdx index b671a790..0aa2f930 100644 --- a/versioned_docs/version-6.5.0/api/booleanCrosses.mdx +++ b/versioned_docs/version-6.5.0/api/booleanCrosses.mdx @@ -4,8 +4,13 @@ title: booleanCrosses import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than diff --git a/versioned_docs/version-6.5.0/api/booleanDisjoint.mdx b/versioned_docs/version-6.5.0/api/booleanDisjoint.mdx index bca1ae20..3591bec0 100644 --- a/versioned_docs/version-6.5.0/api/booleanDisjoint.mdx +++ b/versioned_docs/version-6.5.0/api/booleanDisjoint.mdx @@ -4,8 +4,13 @@ title: booleanDisjoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set. diff --git a/versioned_docs/version-6.5.0/api/booleanEqual.mdx b/versioned_docs/version-6.5.0/api/booleanEqual.mdx index 787c89ea..87e2c624 100644 --- a/versioned_docs/version-6.5.0/api/booleanEqual.mdx +++ b/versioned_docs/version-6.5.0/api/booleanEqual.mdx @@ -4,8 +4,13 @@ title: booleanEqual import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Determine whether two geometries of the same type have identical X,Y coordinate values. diff --git a/versioned_docs/version-6.5.0/api/booleanIntersects.mdx b/versioned_docs/version-6.5.0/api/booleanIntersects.mdx index 315efd31..0eef360f 100644 --- a/versioned_docs/version-6.5.0/api/booleanIntersects.mdx +++ b/versioned_docs/version-6.5.0/api/booleanIntersects.mdx @@ -4,8 +4,13 @@ title: booleanIntersects import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-intersects returns (TRUE) two geometries intersect. diff --git a/versioned_docs/version-6.5.0/api/booleanOverlap.mdx b/versioned_docs/version-6.5.0/api/booleanOverlap.mdx index 9bdafac5..c883256f 100644 --- a/versioned_docs/version-6.5.0/api/booleanOverlap.mdx +++ b/versioned_docs/version-6.5.0/api/booleanOverlap.mdx @@ -4,8 +4,13 @@ title: booleanOverlap import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Compares two geometries of the same dimension and returns true if their intersection set results in a geometry diff --git a/versioned_docs/version-6.5.0/api/booleanParallel.mdx b/versioned_docs/version-6.5.0/api/booleanParallel.mdx index 9d03fcef..4162b620 100644 --- a/versioned_docs/version-6.5.0/api/booleanParallel.mdx +++ b/versioned_docs/version-6.5.0/api/booleanParallel.mdx @@ -4,8 +4,13 @@ title: booleanParallel import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2` diff --git a/versioned_docs/version-6.5.0/api/booleanPointInPolygon.mdx b/versioned_docs/version-6.5.0/api/booleanPointInPolygon.mdx index 7433ade7..458887ab 100644 --- a/versioned_docs/version-6.5.0/api/booleanPointInPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/booleanPointInPolygon.mdx @@ -4,8 +4,13 @@ title: booleanPointInPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) and determines if the point diff --git a/versioned_docs/version-6.5.0/api/booleanPointOnLine.mdx b/versioned_docs/version-6.5.0/api/booleanPointOnLine.mdx index ce15bd57..84fd2f76 100644 --- a/versioned_docs/version-6.5.0/api/booleanPointOnLine.mdx +++ b/versioned_docs/version-6.5.0/api/booleanPointOnLine.mdx @@ -4,8 +4,13 @@ title: booleanPointOnLine import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns true if a point is on a line. Accepts a optional parameter to ignore the diff --git a/versioned_docs/version-6.5.0/api/booleanTouches.mdx b/versioned_docs/version-6.5.0/api/booleanTouches.mdx index 9a3ec2db..b7d00469 100644 --- a/versioned_docs/version-6.5.0/api/booleanTouches.mdx +++ b/versioned_docs/version-6.5.0/api/booleanTouches.mdx @@ -4,8 +4,13 @@ title: booleanTouches import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-touches true if none of the points common to both geometries diff --git a/versioned_docs/version-6.5.0/api/booleanValid.mdx b/versioned_docs/version-6.5.0/api/booleanValid.mdx index 345f3620..da316217 100644 --- a/versioned_docs/version-6.5.0/api/booleanValid.mdx +++ b/versioned_docs/version-6.5.0/api/booleanValid.mdx @@ -4,8 +4,13 @@ title: booleanValid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description booleanValid checks if the geometry is a valid according to the OGC Simple Feature Specification. diff --git a/versioned_docs/version-6.5.0/api/booleanWithin.mdx b/versioned_docs/version-6.5.0/api/booleanWithin.mdx index c7350e06..eb2ec969 100644 --- a/versioned_docs/version-6.5.0/api/booleanWithin.mdx +++ b/versioned_docs/version-6.5.0/api/booleanWithin.mdx @@ -4,8 +4,13 @@ title: booleanWithin import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-within returns true if the first geometry is completely within the second geometry. diff --git a/versioned_docs/version-6.5.0/api/buffer.mdx b/versioned_docs/version-6.5.0/api/buffer.mdx index f9b3aca9..c55f6b0b 100644 --- a/versioned_docs/version-6.5.0/api/buffer.mdx +++ b/versioned_docs/version-6.5.0/api/buffer.mdx @@ -4,8 +4,13 @@ title: buffer import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. diff --git a/versioned_docs/version-6.5.0/api/center.mdx b/versioned_docs/version-6.5.0/api/center.mdx index e14a125b..c2499b8c 100644 --- a/versioned_docs/version-6.5.0/api/center.mdx +++ b/versioned_docs/version-6.5.0/api/center.mdx @@ -4,8 +4,13 @@ title: center import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the absolute center point of all features. diff --git a/versioned_docs/version-6.5.0/api/centerMean.mdx b/versioned_docs/version-6.5.0/api/centerMean.mdx index 09a02d36..205a6f44 100644 --- a/versioned_docs/version-6.5.0/api/centerMean.mdx +++ b/versioned_docs/version-6.5.0/api/centerMean.mdx @@ -4,8 +4,13 @@ title: centerMean import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the mean center. Can be weighted. diff --git a/versioned_docs/version-6.5.0/api/centerMedian.mdx b/versioned_docs/version-6.5.0/api/centerMedian.mdx index 614a719a..e6762326 100644 --- a/versioned_docs/version-6.5.0/api/centerMedian.mdx +++ b/versioned_docs/version-6.5.0/api/centerMedian.mdx @@ -4,8 +4,13 @@ title: centerMedian import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of points and calculates the median center, diff --git a/versioned_docs/version-6.5.0/api/centerOfMass.mdx b/versioned_docs/version-6.5.0/api/centerOfMass.mdx index 6166aeb0..574a47c0 100644 --- a/versioned_docs/version-6.5.0/api/centerOfMass.mdx +++ b/versioned_docs/version-6.5.0/api/centerOfMass.mdx @@ -4,8 +4,13 @@ title: centerOfMass import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns its [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) using this formula: [Centroid of Polygon](https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon). diff --git a/versioned_docs/version-6.5.0/api/centroid.mdx b/versioned_docs/version-6.5.0/api/centroid.mdx index 9fa66815..b7966810 100644 --- a/versioned_docs/version-6.5.0/api/centroid.mdx +++ b/versioned_docs/version-6.5.0/api/centroid.mdx @@ -4,8 +4,13 @@ title: centroid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more features and calculates the centroid using the mean of all vertices. diff --git a/versioned_docs/version-6.5.0/api/circle.mdx b/versioned_docs/version-6.5.0/api/circle.mdx index b08f13de..b4ddab62 100644 --- a/versioned_docs/version-6.5.0/api/circle.mdx +++ b/versioned_docs/version-6.5.0/api/circle.mdx @@ -4,8 +4,13 @@ title: circle import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision. diff --git a/versioned_docs/version-6.5.0/api/cleanCoords.mdx b/versioned_docs/version-6.5.0/api/cleanCoords.mdx index 77dafaa0..9ff566ec 100644 --- a/versioned_docs/version-6.5.0/api/cleanCoords.mdx +++ b/versioned_docs/version-6.5.0/api/cleanCoords.mdx @@ -4,8 +4,13 @@ title: cleanCoords import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Removes redundant coordinates from any GeoJSON Geometry. diff --git a/versioned_docs/version-6.5.0/api/clone.mdx b/versioned_docs/version-6.5.0/api/clone.mdx index 3993bee4..6d658094 100644 --- a/versioned_docs/version-6.5.0/api/clone.mdx +++ b/versioned_docs/version-6.5.0/api/clone.mdx @@ -4,8 +4,13 @@ title: clone import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'. diff --git a/versioned_docs/version-6.5.0/api/clusterEach.mdx b/versioned_docs/version-6.5.0/api/clusterEach.mdx index 33f0763f..30e292f0 100644 --- a/versioned_docs/version-6.5.0/api/clusterEach.mdx +++ b/versioned_docs/version-6.5.0/api/clusterEach.mdx @@ -4,8 +4,13 @@ title: clusterEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description clusterEach diff --git a/versioned_docs/version-6.5.0/api/clusterReduce.mdx b/versioned_docs/version-6.5.0/api/clusterReduce.mdx index be1341b2..1d57bf05 100644 --- a/versioned_docs/version-6.5.0/api/clusterReduce.mdx +++ b/versioned_docs/version-6.5.0/api/clusterReduce.mdx @@ -4,8 +4,13 @@ title: clusterReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce clusters in GeoJSON Features, similar to Array.reduce() diff --git a/versioned_docs/version-6.5.0/api/clustersDbscan.mdx b/versioned_docs/version-6.5.0/api/clustersDbscan.mdx index 3b3a4033..091184a8 100644 --- a/versioned_docs/version-6.5.0/api/clustersDbscan.mdx +++ b/versioned_docs/version-6.5.0/api/clustersDbscan.mdx @@ -4,8 +4,13 @@ title: clustersDbscan import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters according to [DBSCAN's](https://en.wikipedia.org/wiki/DBSCAN) data clustering algorithm. diff --git a/versioned_docs/version-6.5.0/api/clustersKmeans.mdx b/versioned_docs/version-6.5.0/api/clustersKmeans.mdx index 3c5846d2..a95cc0f9 100644 --- a/versioned_docs/version-6.5.0/api/clustersKmeans.mdx +++ b/versioned_docs/version-6.5.0/api/clustersKmeans.mdx @@ -4,8 +4,13 @@ title: clustersKmeans import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters using the k-mean . diff --git a/versioned_docs/version-6.5.0/api/collect.mdx b/versioned_docs/version-6.5.0/api/collect.mdx index 3d945c6d..e23ec26f 100644 --- a/versioned_docs/version-6.5.0/api/collect.mdx +++ b/versioned_docs/version-6.5.0/api/collect.mdx @@ -4,8 +4,13 @@ title: collect import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Merges a specified property from a FeatureCollection of points into a diff --git a/versioned_docs/version-6.5.0/api/collectionOf.mdx b/versioned_docs/version-6.5.0/api/collectionOf.mdx index 196854ea..65b3f560 100644 --- a/versioned_docs/version-6.5.0/api/collectionOf.mdx +++ b/versioned_docs/version-6.5.0/api/collectionOf.mdx @@ -4,8 +4,13 @@ title: collectionOf import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inputs for Turf. diff --git a/versioned_docs/version-6.5.0/api/combine.mdx b/versioned_docs/version-6.5.0/api/combine.mdx index 3ac1af6e..1b6733e4 100644 --- a/versioned_docs/version-6.5.0/api/combine.mdx +++ b/versioned_docs/version-6.5.0/api/combine.mdx @@ -4,8 +4,13 @@ title: combine import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Combines a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), or [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) features diff --git a/versioned_docs/version-6.5.0/api/concave.mdx b/versioned_docs/version-6.5.0/api/concave.mdx index 639c4fdd..dce24144 100644 --- a/versioned_docs/version-6.5.0/api/concave.mdx +++ b/versioned_docs/version-6.5.0/api/concave.mdx @@ -4,8 +4,13 @@ title: concave import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a concave hull Polygon or MultiPolygon. diff --git a/versioned_docs/version-6.5.0/api/containsNumber.mdx b/versioned_docs/version-6.5.0/api/containsNumber.mdx index a13ca050..f637977b 100644 --- a/versioned_docs/version-6.5.0/api/containsNumber.mdx +++ b/versioned_docs/version-6.5.0/api/containsNumber.mdx @@ -4,8 +4,13 @@ title: containsNumber import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Checks if coordinates contains a number diff --git a/versioned_docs/version-6.5.0/api/convertArea.mdx b/versioned_docs/version-6.5.0/api/convertArea.mdx index 50748146..093a5874 100644 --- a/versioned_docs/version-6.5.0/api/convertArea.mdx +++ b/versioned_docs/version-6.5.0/api/convertArea.mdx @@ -4,8 +4,13 @@ title: convertArea import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a area to the requested unit. diff --git a/versioned_docs/version-6.5.0/api/convertLength.mdx b/versioned_docs/version-6.5.0/api/convertLength.mdx index 43cfec90..bfd5117c 100644 --- a/versioned_docs/version-6.5.0/api/convertLength.mdx +++ b/versioned_docs/version-6.5.0/api/convertLength.mdx @@ -4,8 +4,13 @@ title: convertLength import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a length to the requested unit. diff --git a/versioned_docs/version-6.5.0/api/convex.mdx b/versioned_docs/version-6.5.0/api/convex.mdx index e0c07402..687b2f16 100644 --- a/versioned_docs/version-6.5.0/api/convex.mdx +++ b/versioned_docs/version-6.5.0/api/convex.mdx @@ -4,8 +4,13 @@ title: convex import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a convex hull [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-6.5.0/api/coordAll.mdx b/versioned_docs/version-6.5.0/api/coordAll.mdx index 81cc45a8..8b0a6ccc 100644 --- a/versioned_docs/version-6.5.0/api/coordAll.mdx +++ b/versioned_docs/version-6.5.0/api/coordAll.mdx @@ -4,8 +4,13 @@ title: coordAll import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get all coordinates from any GeoJSON object. diff --git a/versioned_docs/version-6.5.0/api/coordEach.mdx b/versioned_docs/version-6.5.0/api/coordEach.mdx index b06423f2..a77fa06b 100644 --- a/versioned_docs/version-6.5.0/api/coordEach.mdx +++ b/versioned_docs/version-6.5.0/api/coordEach.mdx @@ -4,8 +4,13 @@ title: coordEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over coordinates in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-6.5.0/api/coordReduce.mdx b/versioned_docs/version-6.5.0/api/coordReduce.mdx index fb38baaf..1a74ead5 100644 --- a/versioned_docs/version-6.5.0/api/coordReduce.mdx +++ b/versioned_docs/version-6.5.0/api/coordReduce.mdx @@ -4,8 +4,13 @@ title: coordReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce coordinates in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-6.5.0/api/degreesToRadians.mdx b/versioned_docs/version-6.5.0/api/degreesToRadians.mdx index 401b3f5d..e877f01e 100644 --- a/versioned_docs/version-6.5.0/api/degreesToRadians.mdx +++ b/versioned_docs/version-6.5.0/api/degreesToRadians.mdx @@ -4,8 +4,13 @@ title: degreesToRadians import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in degrees to radians diff --git a/versioned_docs/version-6.5.0/api/destination.mdx b/versioned_docs/version-6.5.0/api/destination.mdx index 39eeac30..7df09a9a 100644 --- a/versioned_docs/version-6.5.0/api/destination.mdx +++ b/versioned_docs/version-6.5.0/api/destination.mdx @@ -4,8 +4,13 @@ title: destination import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the location of a destination point given a distance in diff --git a/versioned_docs/version-6.5.0/api/difference.mdx b/versioned_docs/version-6.5.0/api/difference.mdx index fe931a75..d8df9610 100644 --- a/versioned_docs/version-6.5.0/api/difference.mdx +++ b/versioned_docs/version-6.5.0/api/difference.mdx @@ -4,8 +4,13 @@ title: difference import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the difference between two [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) by clipping the second polygon from the first. diff --git a/versioned_docs/version-6.5.0/api/directionalMean.mdx b/versioned_docs/version-6.5.0/api/directionalMean.mdx index 6863f56a..4fed3fb5 100644 --- a/versioned_docs/version-6.5.0/api/directionalMean.mdx +++ b/versioned_docs/version-6.5.0/api/directionalMean.mdx @@ -4,8 +4,13 @@ title: directionalMean import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description This module calculate the average angle of a set of lines, measuring the trend of it. diff --git a/versioned_docs/version-6.5.0/api/dissolve.mdx b/versioned_docs/version-6.5.0/api/dissolve.mdx index ff0b8730..10a5f865 100644 --- a/versioned_docs/version-6.5.0/api/dissolve.mdx +++ b/versioned_docs/version-6.5.0/api/dissolve.mdx @@ -4,8 +4,13 @@ title: dissolve import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Dissolves a FeatureCollection of [polygon](polygon) features, filtered by an optional property name:value. diff --git a/versioned_docs/version-6.5.0/api/distance.mdx b/versioned_docs/version-6.5.0/api/distance.mdx index 3bc42a28..9097fc34 100644 --- a/versioned_docs/version-6.5.0/api/distance.mdx +++ b/versioned_docs/version-6.5.0/api/distance.mdx @@ -4,8 +4,13 @@ title: distance import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, miles, or kilometers. diff --git a/versioned_docs/version-6.5.0/api/distanceWeight.mdx b/versioned_docs/version-6.5.0/api/distanceWeight.mdx index 73a8430c..1c12eb01 100644 --- a/versioned_docs/version-6.5.0/api/distanceWeight.mdx +++ b/versioned_docs/version-6.5.0/api/distanceWeight.mdx @@ -4,8 +4,13 @@ title: distanceWeight import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ### Parameters diff --git a/versioned_docs/version-6.5.0/api/ellipse.mdx b/versioned_docs/version-6.5.0/api/ellipse.mdx index 75ecff55..3136df42 100644 --- a/versioned_docs/version-6.5.0/api/ellipse.mdx +++ b/versioned_docs/version-6.5.0/api/ellipse.mdx @@ -4,8 +4,13 @@ title: ellipse import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision. diff --git a/versioned_docs/version-6.5.0/api/envelope.mdx b/versioned_docs/version-6.5.0/api/envelope.mdx index b078637c..fa5bee52 100644 --- a/versioned_docs/version-6.5.0/api/envelope.mdx +++ b/versioned_docs/version-6.5.0/api/envelope.mdx @@ -4,8 +4,13 @@ title: envelope import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any number of features and returns a rectangular [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) that encompasses all vertices. diff --git a/versioned_docs/version-6.5.0/api/explode.mdx b/versioned_docs/version-6.5.0/api/explode.mdx index 55425adb..0054e4a2 100644 --- a/versioned_docs/version-6.5.0/api/explode.mdx +++ b/versioned_docs/version-6.5.0/api/explode.mdx @@ -4,8 +4,13 @@ title: explode import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a feature or set of features and returns all positions as [points](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-6.5.0/api/feature.mdx b/versioned_docs/version-6.5.0/api/feature.mdx index f682ad2c..58b999f0 100644 --- a/versioned_docs/version-6.5.0/api/feature.mdx +++ b/versioned_docs/version-6.5.0/api/feature.mdx @@ -4,8 +4,13 @@ title: feature import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Wraps a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) in a GeoJSON [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). diff --git a/versioned_docs/version-6.5.0/api/featureCollection.mdx b/versioned_docs/version-6.5.0/api/featureCollection.mdx index 4d9ed14d..617268d0 100644 --- a/versioned_docs/version-6.5.0/api/featureCollection.mdx +++ b/versioned_docs/version-6.5.0/api/featureCollection.mdx @@ -4,8 +4,13 @@ title: featureCollection import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more [Features](https://tools.ietf.org/html/rfc7946#section-3.2) and creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3). diff --git a/versioned_docs/version-6.5.0/api/featureEach.mdx b/versioned_docs/version-6.5.0/api/featureEach.mdx index 28a66567..a5fcddcf 100644 --- a/versioned_docs/version-6.5.0/api/featureEach.mdx +++ b/versioned_docs/version-6.5.0/api/featureEach.mdx @@ -4,8 +4,13 @@ title: featureEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over features in any GeoJSON object, similar to diff --git a/versioned_docs/version-6.5.0/api/featureOf.mdx b/versioned_docs/version-6.5.0/api/featureOf.mdx index 8070e7f3..3d677aa2 100644 --- a/versioned_docs/version-6.5.0/api/featureOf.mdx +++ b/versioned_docs/version-6.5.0/api/featureOf.mdx @@ -4,8 +4,13 @@ title: featureOf import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) inputs for Turf. diff --git a/versioned_docs/version-6.5.0/api/featureReduce.mdx b/versioned_docs/version-6.5.0/api/featureReduce.mdx index 366b8ae3..6c5f3e55 100644 --- a/versioned_docs/version-6.5.0/api/featureReduce.mdx +++ b/versioned_docs/version-6.5.0/api/featureReduce.mdx @@ -4,8 +4,13 @@ title: featureReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-6.5.0/api/findPoint.mdx b/versioned_docs/version-6.5.0/api/findPoint.mdx index bda012b5..739d3c05 100644 --- a/versioned_docs/version-6.5.0/api/findPoint.mdx +++ b/versioned_docs/version-6.5.0/api/findPoint.mdx @@ -4,8 +4,13 @@ title: findPoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular Point from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-6.5.0/api/findSegment.mdx b/versioned_docs/version-6.5.0/api/findSegment.mdx index 7e702e94..f76ba794 100644 --- a/versioned_docs/version-6.5.0/api/findSegment.mdx +++ b/versioned_docs/version-6.5.0/api/findSegment.mdx @@ -4,8 +4,13 @@ title: findSegment import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-6.5.0/api/flatten.mdx b/versioned_docs/version-6.5.0/api/flatten.mdx index 213d663b..fc4e50f9 100644 --- a/versioned_docs/version-6.5.0/api/flatten.mdx +++ b/versioned_docs/version-6.5.0/api/flatten.mdx @@ -4,8 +4,13 @@ title: flatten import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Flattens any [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) to a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten). diff --git a/versioned_docs/version-6.5.0/api/flattenEach.mdx b/versioned_docs/version-6.5.0/api/flattenEach.mdx index 48e788c3..959d2c70 100644 --- a/versioned_docs/version-6.5.0/api/flattenEach.mdx +++ b/versioned_docs/version-6.5.0/api/flattenEach.mdx @@ -4,8 +4,13 @@ title: flattenEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over flattened features in any GeoJSON object, similar to diff --git a/versioned_docs/version-6.5.0/api/flattenReduce.mdx b/versioned_docs/version-6.5.0/api/flattenReduce.mdx index fea155db..8a75d728 100644 --- a/versioned_docs/version-6.5.0/api/flattenReduce.mdx +++ b/versioned_docs/version-6.5.0/api/flattenReduce.mdx @@ -4,8 +4,13 @@ title: flattenReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce flattened features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-6.5.0/api/flip.mdx b/versioned_docs/version-6.5.0/api/flip.mdx index 5537af28..461ea372 100644 --- a/versioned_docs/version-6.5.0/api/flip.mdx +++ b/versioned_docs/version-6.5.0/api/flip.mdx @@ -4,8 +4,13 @@ title: flip import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`. diff --git a/versioned_docs/version-6.5.0/api/geojsonType.mdx b/versioned_docs/version-6.5.0/api/geojsonType.mdx index 878a81a2..532d0511 100644 --- a/versioned_docs/version-6.5.0/api/geojsonType.mdx +++ b/versioned_docs/version-6.5.0/api/geojsonType.mdx @@ -4,8 +4,13 @@ title: geojsonType import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of GeoJSON objects for Turf. diff --git a/versioned_docs/version-6.5.0/api/geomEach.mdx b/versioned_docs/version-6.5.0/api/geomEach.mdx index 9d9e1358..3aff10db 100644 --- a/versioned_docs/version-6.5.0/api/geomEach.mdx +++ b/versioned_docs/version-6.5.0/api/geomEach.mdx @@ -4,8 +4,13 @@ title: geomEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over each geometry in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-6.5.0/api/geomReduce.mdx b/versioned_docs/version-6.5.0/api/geomReduce.mdx index 91a376e9..2fbf041b 100644 --- a/versioned_docs/version-6.5.0/api/geomReduce.mdx +++ b/versioned_docs/version-6.5.0/api/geomReduce.mdx @@ -4,8 +4,13 @@ title: geomReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce geometry in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-6.5.0/api/geometry.mdx b/versioned_docs/version-6.5.0/api/geometry.mdx index e03e15c8..ae860fae 100644 --- a/versioned_docs/version-6.5.0/api/geometry.mdx +++ b/versioned_docs/version-6.5.0/api/geometry.mdx @@ -4,8 +4,13 @@ title: geometry import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) from a Geometry string type & coordinates. diff --git a/versioned_docs/version-6.5.0/api/geometryCollection.mdx b/versioned_docs/version-6.5.0/api/geometryCollection.mdx index 5e205a5a..1fc471ba 100644 --- a/versioned_docs/version-6.5.0/api/geometryCollection.mdx +++ b/versioned_docs/version-6.5.0/api/geometryCollection.mdx @@ -4,8 +4,13 @@ title: geometryCollection import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)> based on a diff --git a/versioned_docs/version-6.5.0/api/getCluster.mdx b/versioned_docs/version-6.5.0/api/getCluster.mdx index 69461e3b..e11ab5f1 100644 --- a/versioned_docs/version-6.5.0/api/getCluster.mdx +++ b/versioned_docs/version-6.5.0/api/getCluster.mdx @@ -4,8 +4,13 @@ title: getCluster import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Cluster diff --git a/versioned_docs/version-6.5.0/api/getCoord.mdx b/versioned_docs/version-6.5.0/api/getCoord.mdx index d572dae5..5991c64e 100644 --- a/versioned_docs/version-6.5.0/api/getCoord.mdx +++ b/versioned_docs/version-6.5.0/api/getCoord.mdx @@ -4,8 +4,13 @@ title: getCoord import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap a coordinate from a Point Feature, Geometry or a single coordinate. diff --git a/versioned_docs/version-6.5.0/api/getCoords.mdx b/versioned_docs/version-6.5.0/api/getCoords.mdx index e7a790d7..05f46ec0 100644 --- a/versioned_docs/version-6.5.0/api/getCoords.mdx +++ b/versioned_docs/version-6.5.0/api/getCoords.mdx @@ -4,8 +4,13 @@ title: getCoords import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap coordinates from a Feature, Geometry Object or an Array diff --git a/versioned_docs/version-6.5.0/api/getGeom.mdx b/versioned_docs/version-6.5.0/api/getGeom.mdx index 461ed296..781925f2 100644 --- a/versioned_docs/version-6.5.0/api/getGeom.mdx +++ b/versioned_docs/version-6.5.0/api/getGeom.mdx @@ -4,8 +4,13 @@ title: getGeom import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Geometry from Feature or Geometry Object diff --git a/versioned_docs/version-6.5.0/api/getType.mdx b/versioned_docs/version-6.5.0/api/getType.mdx index 881e3f33..d3bcab02 100644 --- a/versioned_docs/version-6.5.0/api/getType.mdx +++ b/versioned_docs/version-6.5.0/api/getType.mdx @@ -4,8 +4,13 @@ title: getType import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get GeoJSON object's type, Geometry type is prioritize. diff --git a/versioned_docs/version-6.5.0/api/greatCircle.mdx b/versioned_docs/version-6.5.0/api/greatCircle.mdx index 8984069c..9e157898 100644 --- a/versioned_docs/version-6.5.0/api/greatCircle.mdx +++ b/versioned_docs/version-6.5.0/api/greatCircle.mdx @@ -4,8 +4,13 @@ title: greatCircle import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculate great circles routes as [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5). diff --git a/versioned_docs/version-6.5.0/api/hexGrid.mdx b/versioned_docs/version-6.5.0/api/hexGrid.mdx index 9e40c738..9dba8a1d 100644 --- a/versioned_docs/version-6.5.0/api/hexGrid.mdx +++ b/versioned_docs/version-6.5.0/api/hexGrid.mdx @@ -4,8 +4,13 @@ title: hexGrid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and the diameter of the cell and returns a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of flat-topped diff --git a/versioned_docs/version-6.5.0/api/interpolate.mdx b/versioned_docs/version-6.5.0/api/interpolate.mdx index b145708f..763d1129 100644 --- a/versioned_docs/version-6.5.0/api/interpolate.mdx +++ b/versioned_docs/version-6.5.0/api/interpolate.mdx @@ -4,8 +4,13 @@ title: interpolate import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting). diff --git a/versioned_docs/version-6.5.0/api/intersect.mdx b/versioned_docs/version-6.5.0/api/intersect.mdx index 69c222e5..52a44a05 100644 --- a/versioned_docs/version-6.5.0/api/intersect.mdx +++ b/versioned_docs/version-6.5.0/api/intersect.mdx @@ -4,8 +4,13 @@ title: intersect import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [multi-polygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) geometries and diff --git a/versioned_docs/version-6.5.0/api/isNumber.mdx b/versioned_docs/version-6.5.0/api/isNumber.mdx index 590f31ee..9cb74670 100644 --- a/versioned_docs/version-6.5.0/api/isNumber.mdx +++ b/versioned_docs/version-6.5.0/api/isNumber.mdx @@ -4,8 +4,13 @@ title: isNumber import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isNumber diff --git a/versioned_docs/version-6.5.0/api/isObject.mdx b/versioned_docs/version-6.5.0/api/isObject.mdx index 2e7ab688..9a53f5a3 100644 --- a/versioned_docs/version-6.5.0/api/isObject.mdx +++ b/versioned_docs/version-6.5.0/api/isObject.mdx @@ -4,8 +4,13 @@ title: isObject import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isObject diff --git a/versioned_docs/version-6.5.0/api/isobands.mdx b/versioned_docs/version-6.5.0/api/isobands.mdx index 11692241..5233238a 100644 --- a/versioned_docs/version-6.5.0/api/isobands.mdx +++ b/versioned_docs/version-6.5.0/api/isobands.mdx @@ -4,8 +4,13 @@ title: isobands import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a square or rectangular grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-6.5.0/api/isolines.mdx b/versioned_docs/version-6.5.0/api/isolines.mdx index dc374efa..fbe07425 100644 --- a/versioned_docs/version-6.5.0/api/isolines.mdx +++ b/versioned_docs/version-6.5.0/api/isolines.mdx @@ -4,8 +4,13 @@ title: isolines import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-6.5.0/api/kinks.mdx b/versioned_docs/version-6.5.0/api/kinks.mdx index e5ce67e6..247f4f66 100644 --- a/versioned_docs/version-6.5.0/api/kinks.mdx +++ b/versioned_docs/version-6.5.0/api/kinks.mdx @@ -4,8 +4,13 @@ title: kinks import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [linestring](https://tools.ietf.org/html/rfc7946#section-3.1.4), [multi-linestring](https://tools.ietf.org/html/rfc7946#section-3.1.5), diff --git a/versioned_docs/version-6.5.0/api/length.mdx b/versioned_docs/version-6.5.0/api/length.mdx index 847edf62..b40aa538 100644 --- a/versioned_docs/version-6.5.0/api/length.mdx +++ b/versioned_docs/version-6.5.0/api/length.mdx @@ -4,8 +4,13 @@ title: length import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) and measures its length in the specified units, [(Multi)Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)'s distance are ignored. diff --git a/versioned_docs/version-6.5.0/api/lengthToDegrees.mdx b/versioned_docs/version-6.5.0/api/lengthToDegrees.mdx index 6f859c00..8b77d0fd 100644 --- a/versioned_docs/version-6.5.0/api/lengthToDegrees.mdx +++ b/versioned_docs/version-6.5.0/api/lengthToDegrees.mdx @@ -4,8 +4,13 @@ title: lengthToDegrees import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees diff --git a/versioned_docs/version-6.5.0/api/lengthToRadians.mdx b/versioned_docs/version-6.5.0/api/lengthToRadians.mdx index 391717fa..aca992b6 100644 --- a/versioned_docs/version-6.5.0/api/lengthToRadians.mdx +++ b/versioned_docs/version-6.5.0/api/lengthToRadians.mdx @@ -4,8 +4,13 @@ title: lengthToRadians import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians diff --git a/versioned_docs/version-6.5.0/api/lineArc.mdx b/versioned_docs/version-6.5.0/api/lineArc.mdx index 751e4100..48b428c0 100644 --- a/versioned_docs/version-6.5.0/api/lineArc.mdx +++ b/versioned_docs/version-6.5.0/api/lineArc.mdx @@ -4,8 +4,13 @@ title: lineArc import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; diff --git a/versioned_docs/version-6.5.0/api/lineChunk.mdx b/versioned_docs/version-6.5.0/api/lineChunk.mdx index f1c572cf..8c0cfe49 100644 --- a/versioned_docs/version-6.5.0/api/lineChunk.mdx +++ b/versioned_docs/version-6.5.0/api/lineChunk.mdx @@ -4,8 +4,13 @@ title: lineChunk import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Divides a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) into chunks of a specified length. diff --git a/versioned_docs/version-6.5.0/api/lineEach.mdx b/versioned_docs/version-6.5.0/api/lineEach.mdx index 42f65da9..029d419f 100644 --- a/versioned_docs/version-6.5.0/api/lineEach.mdx +++ b/versioned_docs/version-6.5.0/api/lineEach.mdx @@ -4,8 +4,13 @@ title: lineEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries, diff --git a/versioned_docs/version-6.5.0/api/lineIntersect.mdx b/versioned_docs/version-6.5.0/api/lineIntersect.mdx index b7adb74d..3e321b92 100644 --- a/versioned_docs/version-6.5.0/api/lineIntersect.mdx +++ b/versioned_docs/version-6.5.0/api/lineIntersect.mdx @@ -4,8 +4,13 @@ title: lineIntersect import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). diff --git a/versioned_docs/version-6.5.0/api/lineOffset.mdx b/versioned_docs/version-6.5.0/api/lineOffset.mdx index ffb6ad24..7a2e04bc 100644 --- a/versioned_docs/version-6.5.0/api/lineOffset.mdx +++ b/versioned_docs/version-6.5.0/api/lineOffset.mdx @@ -4,8 +4,13 @@ title: lineOffset import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) at offset by the specified distance. diff --git a/versioned_docs/version-6.5.0/api/lineOverlap.mdx b/versioned_docs/version-6.5.0/api/lineOverlap.mdx index 68971139..b51d3f84 100644 --- a/versioned_docs/version-6.5.0/api/lineOverlap.mdx +++ b/versioned_docs/version-6.5.0/api/lineOverlap.mdx @@ -4,8 +4,13 @@ title: lineOverlap import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon and returns the overlapping lines between both features. diff --git a/versioned_docs/version-6.5.0/api/lineReduce.mdx b/versioned_docs/version-6.5.0/api/lineReduce.mdx index 37eb88ba..2361eef2 100644 --- a/versioned_docs/version-6.5.0/api/lineReduce.mdx +++ b/versioned_docs/version-6.5.0/api/lineReduce.mdx @@ -4,8 +4,13 @@ title: lineReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-6.5.0/api/lineSegment.mdx b/versioned_docs/version-6.5.0/api/lineSegment.mdx index 591ccfc3..86238458 100644 --- a/versioned_docs/version-6.5.0/api/lineSegment.mdx +++ b/versioned_docs/version-6.5.0/api/lineSegment.mdx @@ -4,8 +4,13 @@ title: lineSegment import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of 2-vertex [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) segments from a diff --git a/versioned_docs/version-6.5.0/api/lineSlice.mdx b/versioned_docs/version-6.5.0/api/lineSlice.mdx index 01ba0f66..3c566564 100644 --- a/versioned_docs/version-6.5.0/api/lineSlice.mdx +++ b/versioned_docs/version-6.5.0/api/lineSlice.mdx @@ -4,8 +4,13 @@ title: lineSlice import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), and a stop point diff --git a/versioned_docs/version-6.5.0/api/lineSliceAlong.mdx b/versioned_docs/version-6.5.0/api/lineSliceAlong.mdx index 61a875a4..3d7cdfc3 100644 --- a/versioned_docs/version-6.5.0/api/lineSliceAlong.mdx +++ b/versioned_docs/version-6.5.0/api/lineSliceAlong.mdx @@ -4,8 +4,13 @@ title: lineSliceAlong import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a specified distance along the line to a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-6.5.0/api/lineSplit.mdx b/versioned_docs/version-6.5.0/api/lineSplit.mdx index 68417bf3..92a27318 100644 --- a/versioned_docs/version-6.5.0/api/lineSplit.mdx +++ b/versioned_docs/version-6.5.0/api/lineSplit.mdx @@ -4,8 +4,13 @@ title: lineSplit import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Split a LineString by another GeoJSON Feature. diff --git a/versioned_docs/version-6.5.0/api/lineString.mdx b/versioned_docs/version-6.5.0/api/lineString.mdx index 06a509fb..f98f9d7a 100644 --- a/versioned_docs/version-6.5.0/api/lineString.mdx +++ b/versioned_docs/version-6.5.0/api/lineString.mdx @@ -4,8 +4,13 @@ title: lineString import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of Positions. diff --git a/versioned_docs/version-6.5.0/api/lineStrings.mdx b/versioned_docs/version-6.5.0/api/lineStrings.mdx index 35d102b4..a504fe24 100644 --- a/versioned_docs/version-6.5.0/api/lineStrings.mdx +++ b/versioned_docs/version-6.5.0/api/lineStrings.mdx @@ -4,8 +4,13 @@ title: lineStrings import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of LineString coordinates. diff --git a/versioned_docs/version-6.5.0/api/lineToPolygon.mdx b/versioned_docs/version-6.5.0/api/lineToPolygon.mdx index 2b51f440..74e57098 100644 --- a/versioned_docs/version-6.5.0/api/lineToPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/lineToPolygon.mdx @@ -4,8 +4,13 @@ title: lineToPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts (Multi)LineString(s) to Polygon(s). diff --git a/versioned_docs/version-6.5.0/api/mask.mdx b/versioned_docs/version-6.5.0/api/mask.mdx index e6d2dcb0..fe2dfa91 100644 --- a/versioned_docs/version-6.5.0/api/mask.mdx +++ b/versioned_docs/version-6.5.0/api/mask.mdx @@ -4,8 +4,13 @@ title: mask import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any type of [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) and an optional mask and returns a [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) exterior ring with holes. diff --git a/versioned_docs/version-6.5.0/api/mean.mdx b/versioned_docs/version-6.5.0/api/mean.mdx index 70bf3d78..faa6bcd9 100644 --- a/versioned_docs/version-6.5.0/api/mean.mdx +++ b/versioned_docs/version-6.5.0/api/mean.mdx @@ -4,8 +4,13 @@ title: mean import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get mean of a list diff --git a/versioned_docs/version-6.5.0/api/midpoint.mdx b/versioned_docs/version-6.5.0/api/midpoint.mdx index 7070d567..759c63a9 100644 --- a/versioned_docs/version-6.5.0/api/midpoint.mdx +++ b/versioned_docs/version-6.5.0/api/midpoint.mdx @@ -4,8 +4,13 @@ title: midpoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a point midway between them. diff --git a/versioned_docs/version-6.5.0/api/moranIndex.mdx b/versioned_docs/version-6.5.0/api/moranIndex.mdx index 534cfd2c..bc62cb8c 100644 --- a/versioned_docs/version-6.5.0/api/moranIndex.mdx +++ b/versioned_docs/version-6.5.0/api/moranIndex.mdx @@ -4,8 +4,13 @@ title: moranIndex import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moran's I measures patterns of attribute values associated with features. diff --git a/versioned_docs/version-6.5.0/api/multiLineString.mdx b/versioned_docs/version-6.5.0/api/multiLineString.mdx index 7e9bcbdd..ef94ce5e 100644 --- a/versioned_docs/version-6.5.0/api/multiLineString.mdx +++ b/versioned_docs/version-6.5.0/api/multiLineString.mdx @@ -4,8 +4,13 @@ title: multiLineString import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)> based on a diff --git a/versioned_docs/version-6.5.0/api/multiPoint.mdx b/versioned_docs/version-6.5.0/api/multiPoint.mdx index 36dd6f61..07cc3f36 100644 --- a/versioned_docs/version-6.5.0/api/multiPoint.mdx +++ b/versioned_docs/version-6.5.0/api/multiPoint.mdx @@ -4,8 +4,13 @@ title: multiPoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)> based on a diff --git a/versioned_docs/version-6.5.0/api/multiPolygon.mdx b/versioned_docs/version-6.5.0/api/multiPolygon.mdx index 1aff1779..e393bcc6 100644 --- a/versioned_docs/version-6.5.0/api/multiPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/multiPolygon.mdx @@ -4,8 +4,13 @@ title: multiPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)> based on a diff --git a/versioned_docs/version-6.5.0/api/nearestPoint.mdx b/versioned_docs/version-6.5.0/api/nearestPoint.mdx index c7882494..de2dcbe2 100644 --- a/versioned_docs/version-6.5.0/api/nearestPoint.mdx +++ b/versioned_docs/version-6.5.0/api/nearestPoint.mdx @@ -4,8 +4,13 @@ title: nearestPoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a reference [point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a FeatureCollection of Features diff --git a/versioned_docs/version-6.5.0/api/nearestPointOnLine.mdx b/versioned_docs/version-6.5.0/api/nearestPointOnLine.mdx index b1a29f47..702266d2 100644 --- a/versioned_docs/version-6.5.0/api/nearestPointOnLine.mdx +++ b/versioned_docs/version-6.5.0/api/nearestPointOnLine.mdx @@ -4,8 +4,13 @@ title: nearestPointOnLine import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and calculates the closest Point on the (Multi)LineString. diff --git a/versioned_docs/version-6.5.0/api/nearestPointToLine.mdx b/versioned_docs/version-6.5.0/api/nearestPointToLine.mdx index a242962e..430cd559 100644 --- a/versioned_docs/version-6.5.0/api/nearestPointToLine.mdx +++ b/versioned_docs/version-6.5.0/api/nearestPointToLine.mdx @@ -4,8 +4,13 @@ title: nearestPointToLine import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the closest [point](https://tools.ietf.org/html/rfc7946#section-3.1.2), of a [collection](https://tools.ietf.org/html/rfc7946#section-3.3) of points, diff --git a/versioned_docs/version-6.5.0/api/pNormDistance.mdx b/versioned_docs/version-6.5.0/api/pNormDistance.mdx index eb9b2d91..7f787b6d 100644 --- a/versioned_docs/version-6.5.0/api/pNormDistance.mdx +++ b/versioned_docs/version-6.5.0/api/pNormDistance.mdx @@ -4,8 +4,13 @@ title: pNormDistance import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description calcualte the Minkowski p-norm distance between two features. diff --git a/versioned_docs/version-6.5.0/api/planepoint.mdx b/versioned_docs/version-6.5.0/api/planepoint.mdx index 509ac5a7..9d6951aa 100644 --- a/versioned_docs/version-6.5.0/api/planepoint.mdx +++ b/versioned_docs/version-6.5.0/api/planepoint.mdx @@ -4,8 +4,13 @@ title: planepoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a triangular plane as a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) diff --git a/versioned_docs/version-6.5.0/api/point.mdx b/versioned_docs/version-6.5.0/api/point.mdx index f3478c5c..a07beb93 100644 --- a/versioned_docs/version-6.5.0/api/point.mdx +++ b/versioned_docs/version-6.5.0/api/point.mdx @@ -4,8 +4,13 @@ title: point import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from a Position. diff --git a/versioned_docs/version-6.5.0/api/pointGrid.mdx b/versioned_docs/version-6.5.0/api/pointGrid.mdx index 95b5ca43..68e002bf 100644 --- a/versioned_docs/version-6.5.0/api/pointGrid.mdx +++ b/versioned_docs/version-6.5.0/api/pointGrid.mdx @@ -4,8 +4,13 @@ title: pointGrid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) grid from a bounding box, [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) or [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). diff --git a/versioned_docs/version-6.5.0/api/pointOnFeature.mdx b/versioned_docs/version-6.5.0/api/pointOnFeature.mdx index 9c184176..00d7fa53 100644 --- a/versioned_docs/version-6.5.0/api/pointOnFeature.mdx +++ b/versioned_docs/version-6.5.0/api/pointOnFeature.mdx @@ -4,8 +4,13 @@ title: pointOnFeature import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) guaranteed to be on the surface of the feature. diff --git a/versioned_docs/version-6.5.0/api/pointToLineDistance.mdx b/versioned_docs/version-6.5.0/api/pointToLineDistance.mdx index e417d06b..60596990 100644 --- a/versioned_docs/version-6.5.0/api/pointToLineDistance.mdx +++ b/versioned_docs/version-6.5.0/api/pointToLineDistance.mdx @@ -4,8 +4,13 @@ title: pointToLineDistance import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the minimum distance between a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), being the distance from a line the diff --git a/versioned_docs/version-6.5.0/api/points.mdx b/versioned_docs/version-6.5.0/api/points.mdx index 5d4fd8f8..9b518a5c 100644 --- a/versioned_docs/version-6.5.0/api/points.mdx +++ b/versioned_docs/version-6.5.0/api/points.mdx @@ -4,8 +4,13 @@ title: points import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Point coordinates. diff --git a/versioned_docs/version-6.5.0/api/pointsWithinPolygon.mdx b/versioned_docs/version-6.5.0/api/pointsWithinPolygon.mdx index 03bf7592..1e1a4960 100644 --- a/versioned_docs/version-6.5.0/api/pointsWithinPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/pointsWithinPolygon.mdx @@ -4,8 +4,13 @@ title: pointsWithinPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds [Points](https://tools.ietf.org/html/rfc7946#section-3.1.2) or [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) coordinate positions that fall within [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-6.5.0/api/polygon.mdx b/versioned_docs/version-6.5.0/api/polygon.mdx index 7df52373..cbd76eb0 100644 --- a/versioned_docs/version-6.5.0/api/polygon.mdx +++ b/versioned_docs/version-6.5.0/api/polygon.mdx @@ -4,8 +4,13 @@ title: polygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of LinearRings. diff --git a/versioned_docs/version-6.5.0/api/polygonSmooth.mdx b/versioned_docs/version-6.5.0/api/polygonSmooth.mdx index 956fadc1..62d8083b 100644 --- a/versioned_docs/version-6.5.0/api/polygonSmooth.mdx +++ b/versioned_docs/version-6.5.0/api/polygonSmooth.mdx @@ -4,8 +4,13 @@ title: polygonSmooth import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Smooths a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7). Based on [Chaikin's algorithm](http://graphics.cs.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html). diff --git a/versioned_docs/version-6.5.0/api/polygonTangents.mdx b/versioned_docs/version-6.5.0/api/polygonTangents.mdx index a9881278..fd3c36ce 100644 --- a/versioned_docs/version-6.5.0/api/polygonTangents.mdx +++ b/versioned_docs/version-6.5.0/api/polygonTangents.mdx @@ -4,8 +4,13 @@ title: polygonTangents import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the tangents of a [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) from a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-6.5.0/api/polygonToLine.mdx b/versioned_docs/version-6.5.0/api/polygonToLine.mdx index 3bf62a1a..d7c95381 100644 --- a/versioned_docs/version-6.5.0/api/polygonToLine.mdx +++ b/versioned_docs/version-6.5.0/api/polygonToLine.mdx @@ -4,8 +4,13 @@ title: polygonToLine import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) to [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) to a diff --git a/versioned_docs/version-6.5.0/api/polygonize.mdx b/versioned_docs/version-6.5.0/api/polygonize.mdx index 781a7093..18dab358 100644 --- a/versioned_docs/version-6.5.0/api/polygonize.mdx +++ b/versioned_docs/version-6.5.0/api/polygonize.mdx @@ -4,8 +4,13 @@ title: polygonize import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Polygonizes [(Multi)LineString(s)](https://tools.ietf.org/html/rfc7946#section-3.1.4) into [Polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-6.5.0/api/polygons.mdx b/versioned_docs/version-6.5.0/api/polygons.mdx index d7e5055a..2c8a658e 100644 --- a/versioned_docs/version-6.5.0/api/polygons.mdx +++ b/versioned_docs/version-6.5.0/api/polygons.mdx @@ -4,8 +4,13 @@ title: polygons import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Polygon coordinates. diff --git a/versioned_docs/version-6.5.0/api/propEach.mdx b/versioned_docs/version-6.5.0/api/propEach.mdx index 56f92ac3..4c10caa4 100644 --- a/versioned_docs/version-6.5.0/api/propEach.mdx +++ b/versioned_docs/version-6.5.0/api/propEach.mdx @@ -4,8 +4,13 @@ title: propEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over properties in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-6.5.0/api/propReduce.mdx b/versioned_docs/version-6.5.0/api/propReduce.mdx index 4353a458..a96530ea 100644 --- a/versioned_docs/version-6.5.0/api/propReduce.mdx +++ b/versioned_docs/version-6.5.0/api/propReduce.mdx @@ -4,8 +4,13 @@ title: propReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce properties in any GeoJSON object into a single value, diff --git a/versioned_docs/version-6.5.0/api/pt.mdx b/versioned_docs/version-6.5.0/api/pt.mdx index b85c163b..4795f079 100644 --- a/versioned_docs/version-6.5.0/api/pt.mdx +++ b/versioned_docs/version-6.5.0/api/pt.mdx @@ -4,8 +4,13 @@ title: pt import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Translate Properties to final Point, priorities: diff --git a/versioned_docs/version-6.5.0/api/quadratAnalysis.mdx b/versioned_docs/version-6.5.0/api/quadratAnalysis.mdx index 61f20071..8510c06a 100644 --- a/versioned_docs/version-6.5.0/api/quadratAnalysis.mdx +++ b/versioned_docs/version-6.5.0/api/quadratAnalysis.mdx @@ -4,8 +4,13 @@ title: quadratAnalysis import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts diff --git a/versioned_docs/version-6.5.0/api/radiansToDegrees.mdx b/versioned_docs/version-6.5.0/api/radiansToDegrees.mdx index a879a84a..6dec4d0b 100644 --- a/versioned_docs/version-6.5.0/api/radiansToDegrees.mdx +++ b/versioned_docs/version-6.5.0/api/radiansToDegrees.mdx @@ -4,8 +4,13 @@ title: radiansToDegrees import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in radians to degrees diff --git a/versioned_docs/version-6.5.0/api/radiansToLength.mdx b/versioned_docs/version-6.5.0/api/radiansToLength.mdx index d4dbc10b..20ee06f8 100644 --- a/versioned_docs/version-6.5.0/api/radiansToLength.mdx +++ b/versioned_docs/version-6.5.0/api/radiansToLength.mdx @@ -4,8 +4,13 @@ title: radiansToLength import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. diff --git a/versioned_docs/version-6.5.0/api/randomLineString.mdx b/versioned_docs/version-6.5.0/api/randomLineString.mdx index d55cbc30..e080c111 100644 --- a/versioned_docs/version-6.5.0/api/randomLineString.mdx +++ b/versioned_docs/version-6.5.0/api/randomLineString.mdx @@ -4,8 +4,13 @@ title: randomLineString import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4). diff --git a/versioned_docs/version-6.5.0/api/randomPoint.mdx b/versioned_docs/version-6.5.0/api/randomPoint.mdx index 6d24385d..8235040d 100644 --- a/versioned_docs/version-6.5.0/api/randomPoint.mdx +++ b/versioned_docs/version-6.5.0/api/randomPoint.mdx @@ -4,8 +4,13 @@ title: randomPoint import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [point](point). diff --git a/versioned_docs/version-6.5.0/api/randomPolygon.mdx b/versioned_docs/version-6.5.0/api/randomPolygon.mdx index 50f09c05..dfe12d2a 100644 --- a/versioned_docs/version-6.5.0/api/randomPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/randomPolygon.mdx @@ -4,8 +4,13 @@ title: randomPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [polygon](polygon). diff --git a/versioned_docs/version-6.5.0/api/randomPosition.mdx b/versioned_docs/version-6.5.0/api/randomPosition.mdx index 7bbf3589..09ba681a 100644 --- a/versioned_docs/version-6.5.0/api/randomPosition.mdx +++ b/versioned_docs/version-6.5.0/api/randomPosition.mdx @@ -4,8 +4,13 @@ title: randomPosition import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random position within a [bounding box](https://tools.ietf.org/html/rfc7946#section-5). diff --git a/versioned_docs/version-6.5.0/api/rewind.mdx b/versioned_docs/version-6.5.0/api/rewind.mdx index 608e0a89..e5046fb9 100644 --- a/versioned_docs/version-6.5.0/api/rewind.mdx +++ b/versioned_docs/version-6.5.0/api/rewind.mdx @@ -4,8 +4,13 @@ title: rewind import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rewind [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) outer ring counterclockwise and inner rings clockwise (Uses [Shoelace Formula](http://en.wikipedia.org/wiki/Shoelace_formula)). diff --git a/versioned_docs/version-6.5.0/api/rhumbBearing.mdx b/versioned_docs/version-6.5.0/api/rhumbBearing.mdx index f31fa5ac..ae058796 100644 --- a/versioned_docs/version-6.5.0/api/rhumbBearing.mdx +++ b/versioned_docs/version-6.5.0/api/rhumbBearing.mdx @@ -4,8 +4,13 @@ title: rhumbBearing import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the bearing angle between them along a Rhumb line diff --git a/versioned_docs/version-6.5.0/api/rhumbDestination.mdx b/versioned_docs/version-6.5.0/api/rhumbDestination.mdx index 340507ef..66dacb90 100644 --- a/versioned_docs/version-6.5.0/api/rhumbDestination.mdx +++ b/versioned_docs/version-6.5.0/api/rhumbDestination.mdx @@ -4,8 +4,13 @@ title: rhumbDestination import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the destination [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) having travelled the given distance along a Rhumb line from the diff --git a/versioned_docs/version-6.5.0/api/rhumbDistance.mdx b/versioned_docs/version-6.5.0/api/rhumbDistance.mdx index 1a6449e6..86414f64 100644 --- a/versioned_docs/version-6.5.0/api/rhumbDistance.mdx +++ b/versioned_docs/version-6.5.0/api/rhumbDistance.mdx @@ -4,8 +4,13 @@ title: rhumbDistance import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance along a rhumb line between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, diff --git a/versioned_docs/version-6.5.0/api/round.mdx b/versioned_docs/version-6.5.0/api/round.mdx index 42d140d3..1dae24f6 100644 --- a/versioned_docs/version-6.5.0/api/round.mdx +++ b/versioned_docs/version-6.5.0/api/round.mdx @@ -4,8 +4,13 @@ title: round import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Round number to precision diff --git a/versioned_docs/version-6.5.0/api/sample.mdx b/versioned_docs/version-6.5.0/api/sample.mdx index b665dec1..bbee969f 100644 --- a/versioned_docs/version-6.5.0/api/sample.mdx +++ b/versioned_docs/version-6.5.0/api/sample.mdx @@ -4,8 +4,13 @@ title: sample import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a FeatureCollection with given number of [features](https://tools.ietf.org/html/rfc7946#section-3.2) at random. diff --git a/versioned_docs/version-6.5.0/api/sector.mdx b/versioned_docs/version-6.5.0/api/sector.mdx index 53c8ca88..2cc42350 100644 --- a/versioned_docs/version-6.5.0/api/sector.mdx +++ b/versioned_docs/version-6.5.0/api/sector.mdx @@ -4,8 +4,13 @@ title: sector import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular sector of a circle of given radius and center [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-6.5.0/api/segmentEach.mdx b/versioned_docs/version-6.5.0/api/segmentEach.mdx index 7acf3b24..f4bef5d2 100644 --- a/versioned_docs/version-6.5.0/api/segmentEach.mdx +++ b/versioned_docs/version-6.5.0/api/segmentEach.mdx @@ -4,8 +4,13 @@ title: segmentEach import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-6.5.0/api/segmentReduce.mdx b/versioned_docs/version-6.5.0/api/segmentReduce.mdx index d0c39cc8..2468fb96 100644 --- a/versioned_docs/version-6.5.0/api/segmentReduce.mdx +++ b/versioned_docs/version-6.5.0/api/segmentReduce.mdx @@ -4,8 +4,13 @@ title: segmentReduce import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-6.5.0/api/shortestPath.mdx b/versioned_docs/version-6.5.0/api/shortestPath.mdx index 4a23a23d..7fff1079 100644 --- a/versioned_docs/version-6.5.0/api/shortestPath.mdx +++ b/versioned_docs/version-6.5.0/api/shortestPath.mdx @@ -4,8 +4,13 @@ title: shortestPath import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the shortest [path](https://tools.ietf.org/html/rfc7946#section-3.1.4) from [start](https://tools.ietf.org/html/rfc7946#section-3.1.2) to [end](https://tools.ietf.org/html/rfc7946#section-3.1.2) without colliding with diff --git a/versioned_docs/version-6.5.0/api/simplify.mdx b/versioned_docs/version-6.5.0/api/simplify.mdx index 042c3f2c..871f502f 100644 --- a/versioned_docs/version-6.5.0/api/simplify.mdx +++ b/versioned_docs/version-6.5.0/api/simplify.mdx @@ -4,8 +4,13 @@ title: simplify import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) object and returns a simplified version. Internally uses diff --git a/versioned_docs/version-6.5.0/api/square.mdx b/versioned_docs/version-6.5.0/api/square.mdx index c223aa87..547b540b 100644 --- a/versioned_docs/version-6.5.0/api/square.mdx +++ b/versioned_docs/version-6.5.0/api/square.mdx @@ -4,8 +4,13 @@ title: square import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and calculates the minimum square bounding box that diff --git a/versioned_docs/version-6.5.0/api/squareGrid.mdx b/versioned_docs/version-6.5.0/api/squareGrid.mdx index eb42a7c1..d9ab968e 100644 --- a/versioned_docs/version-6.5.0/api/squareGrid.mdx +++ b/versioned_docs/version-6.5.0/api/squareGrid.mdx @@ -4,8 +4,13 @@ title: squareGrid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a square grid from a bounding box. diff --git a/versioned_docs/version-6.5.0/api/standardDeviationalEllipse.mdx b/versioned_docs/version-6.5.0/api/standardDeviationalEllipse.mdx index 3a4bf0fe..6a124574 100644 --- a/versioned_docs/version-6.5.0/api/standardDeviationalEllipse.mdx +++ b/versioned_docs/version-6.5.0/api/standardDeviationalEllipse.mdx @@ -4,8 +4,13 @@ title: standardDeviationalEllipse import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a standard deviational ellipse, diff --git a/versioned_docs/version-6.5.0/api/tag.mdx b/versioned_docs/version-6.5.0/api/tag.mdx index 7956b64c..3803c2d4 100644 --- a/versioned_docs/version-6.5.0/api/tag.mdx +++ b/versioned_docs/version-6.5.0/api/tag.mdx @@ -4,8 +4,13 @@ title: tag import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a set of [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) and/or [multipolygons](https://tools.ietf.org/html/rfc7946#section-3.1.7) and performs a spatial join. diff --git a/versioned_docs/version-6.5.0/api/tesselate.mdx b/versioned_docs/version-6.5.0/api/tesselate.mdx index 4da3c52b..b337b04e 100644 --- a/versioned_docs/version-6.5.0/api/tesselate.mdx +++ b/versioned_docs/version-6.5.0/api/tesselate.mdx @@ -4,8 +4,13 @@ title: tesselate import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Tesselates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)> into a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)> of triangles diff --git a/versioned_docs/version-6.5.0/api/tin.mdx b/versioned_docs/version-6.5.0/api/tin.mdx index 7612aaca..8228e6b8 100644 --- a/versioned_docs/version-6.5.0/api/tin.mdx +++ b/versioned_docs/version-6.5.0/api/tin.mdx @@ -4,8 +4,13 @@ title: tin import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and creates a diff --git a/versioned_docs/version-6.5.0/api/toMercator.mdx b/versioned_docs/version-6.5.0/api/toMercator.mdx index 3bb75536..1cf20805 100644 --- a/versioned_docs/version-6.5.0/api/toMercator.mdx +++ b/versioned_docs/version-6.5.0/api/toMercator.mdx @@ -4,8 +4,13 @@ title: toMercator import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection diff --git a/versioned_docs/version-6.5.0/api/toWgs84.mdx b/versioned_docs/version-6.5.0/api/toWgs84.mdx index aa188276..1fae2561 100644 --- a/versioned_docs/version-6.5.0/api/toWgs84.mdx +++ b/versioned_docs/version-6.5.0/api/toWgs84.mdx @@ -4,8 +4,13 @@ title: toWgs84 import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection diff --git a/versioned_docs/version-6.5.0/api/transformRotate.mdx b/versioned_docs/version-6.5.0/api/transformRotate.mdx index 23dc2493..be00eeda 100644 --- a/versioned_docs/version-6.5.0/api/transformRotate.mdx +++ b/versioned_docs/version-6.5.0/api/transformRotate.mdx @@ -4,8 +4,13 @@ title: transformRotate import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point. diff --git a/versioned_docs/version-6.5.0/api/transformScale.mdx b/versioned_docs/version-6.5.0/api/transformScale.mdx index 7f6081f3..9b0acdf7 100644 --- a/versioned_docs/version-6.5.0/api/transformScale.mdx +++ b/versioned_docs/version-6.5.0/api/transformScale.mdx @@ -4,8 +4,13 @@ title: transformScale import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger). diff --git a/versioned_docs/version-6.5.0/api/transformTranslate.mdx b/versioned_docs/version-6.5.0/api/transformTranslate.mdx index 9d70e045..b7edea6d 100644 --- a/versioned_docs/version-6.5.0/api/transformTranslate.mdx +++ b/versioned_docs/version-6.5.0/api/transformTranslate.mdx @@ -4,8 +4,13 @@ title: transformTranslate import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line diff --git a/versioned_docs/version-6.5.0/api/triangleGrid.mdx b/versioned_docs/version-6.5.0/api/triangleGrid.mdx index f09438f8..f607a342 100644 --- a/versioned_docs/version-6.5.0/api/triangleGrid.mdx +++ b/versioned_docs/version-6.5.0/api/triangleGrid.mdx @@ -4,8 +4,13 @@ title: triangleGrid import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and a cell depth and returns a set of triangular [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) in a grid. diff --git a/versioned_docs/version-6.5.0/api/truncate.mdx b/versioned_docs/version-6.5.0/api/truncate.mdx index 83c2d73e..43840ee5 100644 --- a/versioned_docs/version-6.5.0/api/truncate.mdx +++ b/versioned_docs/version-6.5.0/api/truncate.mdx @@ -4,8 +4,13 @@ title: truncate import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry. diff --git a/versioned_docs/version-6.5.0/api/union.mdx b/versioned_docs/version-6.5.0/api/union.mdx index 4479f774..92f2bcbc 100644 --- a/versioned_docs/version-6.5.0/api/union.mdx +++ b/versioned_docs/version-6.5.0/api/union.mdx @@ -4,8 +4,13 @@ title: union import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6) and returns a combined polygon. If the input polygons are not contiguous, this function returns a [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature. diff --git a/versioned_docs/version-6.5.0/api/unkinkPolygon.mdx b/versioned_docs/version-6.5.0/api/unkinkPolygon.mdx index 7eff83f0..760b1fe9 100644 --- a/versioned_docs/version-6.5.0/api/unkinkPolygon.mdx +++ b/versioned_docs/version-6.5.0/api/unkinkPolygon.mdx @@ -4,8 +4,13 @@ title: unkinkPolygon import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a kinked polygon and returns a feature collection of polygons that have no kinks. diff --git a/versioned_docs/version-6.5.0/api/variance.mdx b/versioned_docs/version-6.5.0/api/variance.mdx index 2bfc1ac1..27e1b66a 100644 --- a/versioned_docs/version-6.5.0/api/variance.mdx +++ b/versioned_docs/version-6.5.0/api/variance.mdx @@ -4,8 +4,13 @@ title: variance import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get variance of a list diff --git a/versioned_docs/version-6.5.0/api/voronoi.mdx b/versioned_docs/version-6.5.0/api/voronoi.mdx index 88326404..6559b982 100644 --- a/versioned_docs/version-6.5.0/api/voronoi.mdx +++ b/versioned_docs/version-6.5.0/api/voronoi.mdx @@ -4,8 +4,13 @@ title: voronoi import * as turf from "turf-6"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a FeatureCollection of points, and a bounding box, and returns a FeatureCollection diff --git a/versioned_docs/version-7.0.0/api/along.mdx b/versioned_docs/version-7.0.0/api/along.mdx index ca59a778..fdbfd2b3 100644 --- a/versioned_docs/version-7.0.0/api/along.mdx +++ b/versioned_docs/version-7.0.0/api/along.mdx @@ -4,8 +4,13 @@ title: along import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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. diff --git a/versioned_docs/version-7.0.0/api/angle.mdx b/versioned_docs/version-7.0.0/api/angle.mdx index 8b144f23..64cfdacc 100644 --- a/versioned_docs/version-7.0.0/api/angle.mdx +++ b/versioned_docs/version-7.0.0/api/angle.mdx @@ -4,8 +4,13 @@ title: angle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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) diff --git a/versioned_docs/version-7.0.0/api/area.mdx b/versioned_docs/version-7.0.0/api/area.mdx index c0e61727..070581fa 100644 --- a/versioned_docs/version-7.0.0/api/area.mdx +++ b/versioned_docs/version-7.0.0/api/area.mdx @@ -4,8 +4,13 @@ title: area import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more features and returns their area in square meters. diff --git a/versioned_docs/version-7.0.0/api/bbox.mdx b/versioned_docs/version-7.0.0/api/bbox.mdx index 246249e5..1a5fe4e9 100644 --- a/versioned_docs/version-7.0.0/api/bbox.mdx +++ b/versioned_docs/version-7.0.0/api/bbox.mdx @@ -4,8 +4,13 @@ title: bbox import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the bounding box for any GeoJSON object, including FeatureCollection. diff --git a/versioned_docs/version-7.0.0/api/bboxClip.mdx b/versioned_docs/version-7.0.0/api/bboxClip.mdx index 5124021f..df9328b0 100644 --- a/versioned_docs/version-7.0.0/api/bboxClip.mdx +++ b/versioned_docs/version-7.0.0/api/bboxClip.mdx @@ -4,8 +4,13 @@ title: bboxClip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) and a bbox and clips the feature to the bbox using diff --git a/versioned_docs/version-7.0.0/api/bboxPolygon.mdx b/versioned_docs/version-7.0.0/api/bboxPolygon.mdx index 119619c0..128f29c4 100644 --- a/versioned_docs/version-7.0.0/api/bboxPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/bboxPolygon.mdx @@ -4,8 +4,13 @@ title: bboxPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bbox and returns an equivalent [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.0.0/api/bearing.mdx b/versioned_docs/version-7.0.0/api/bearing.mdx index 91af3bf3..b8a682b0 100644 --- a/versioned_docs/version-7.0.0/api/bearing.mdx +++ b/versioned_docs/version-7.0.0/api/bearing.mdx @@ -4,8 +4,13 @@ title: bearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the geographic bearing between them, diff --git a/versioned_docs/version-7.0.0/api/bearingToAzimuth.mdx b/versioned_docs/version-7.0.0/api/bearingToAzimuth.mdx index 7f61defa..dd06c647 100644 --- a/versioned_docs/version-7.0.0/api/bearingToAzimuth.mdx +++ b/versioned_docs/version-7.0.0/api/bearingToAzimuth.mdx @@ -4,8 +4,13 @@ title: bearingToAzimuth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts any bearing angle from the north line direction (positive clockwise) diff --git a/versioned_docs/version-7.0.0/api/bezierSpline.mdx b/versioned_docs/version-7.0.0/api/bezierSpline.mdx index 3062a93c..b0b0d1b4 100644 --- a/versioned_docs/version-7.0.0/api/bezierSpline.mdx +++ b/versioned_docs/version-7.0.0/api/bezierSpline.mdx @@ -4,8 +4,13 @@ title: bezierSpline import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a curved version diff --git a/versioned_docs/version-7.0.0/api/booleanClockwise.mdx b/versioned_docs/version-7.0.0/api/booleanClockwise.mdx index 923ea0a0..77a0c0e4 100644 --- a/versioned_docs/version-7.0.0/api/booleanClockwise.mdx +++ b/versioned_docs/version-7.0.0/api/booleanClockwise.mdx @@ -4,8 +4,13 @@ title: booleanClockwise import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise. diff --git a/versioned_docs/version-7.0.0/api/booleanConcave.mdx b/versioned_docs/version-7.0.0/api/booleanConcave.mdx index 1b100dba..213e1369 100644 --- a/versioned_docs/version-7.0.0/api/booleanConcave.mdx +++ b/versioned_docs/version-7.0.0/api/booleanConcave.mdx @@ -4,8 +4,13 @@ title: booleanConcave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a polygon and return true or false as to whether it is concave or not. diff --git a/versioned_docs/version-7.0.0/api/booleanContains.mdx b/versioned_docs/version-7.0.0/api/booleanContains.mdx index 55249a0f..1240afe6 100644 --- a/versioned_docs/version-7.0.0/api/booleanContains.mdx +++ b/versioned_docs/version-7.0.0/api/booleanContains.mdx @@ -4,8 +4,13 @@ title: booleanContains import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-contains returns True if the second geometry is completely contained by the first geometry. diff --git a/versioned_docs/version-7.0.0/api/booleanCrosses.mdx b/versioned_docs/version-7.0.0/api/booleanCrosses.mdx index ee763d0e..85ba7969 100644 --- a/versioned_docs/version-7.0.0/api/booleanCrosses.mdx +++ b/versioned_docs/version-7.0.0/api/booleanCrosses.mdx @@ -4,8 +4,13 @@ title: booleanCrosses import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than diff --git a/versioned_docs/version-7.0.0/api/booleanDisjoint.mdx b/versioned_docs/version-7.0.0/api/booleanDisjoint.mdx index 80b53860..89b417a9 100644 --- a/versioned_docs/version-7.0.0/api/booleanDisjoint.mdx +++ b/versioned_docs/version-7.0.0/api/booleanDisjoint.mdx @@ -4,8 +4,13 @@ title: booleanDisjoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set. diff --git a/versioned_docs/version-7.0.0/api/booleanEqual.mdx b/versioned_docs/version-7.0.0/api/booleanEqual.mdx index ef285924..d92861ad 100644 --- a/versioned_docs/version-7.0.0/api/booleanEqual.mdx +++ b/versioned_docs/version-7.0.0/api/booleanEqual.mdx @@ -4,8 +4,13 @@ title: booleanEqual import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Determine whether two geometries of the same type have identical X,Y coordinate values. diff --git a/versioned_docs/version-7.0.0/api/booleanIntersects.mdx b/versioned_docs/version-7.0.0/api/booleanIntersects.mdx index ed889a74..8acf1f83 100644 --- a/versioned_docs/version-7.0.0/api/booleanIntersects.mdx +++ b/versioned_docs/version-7.0.0/api/booleanIntersects.mdx @@ -4,8 +4,13 @@ title: booleanIntersects import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-intersects returns (TRUE) two geometries intersect. diff --git a/versioned_docs/version-7.0.0/api/booleanOverlap.mdx b/versioned_docs/version-7.0.0/api/booleanOverlap.mdx index b4ffe434..cbc7c8e9 100644 --- a/versioned_docs/version-7.0.0/api/booleanOverlap.mdx +++ b/versioned_docs/version-7.0.0/api/booleanOverlap.mdx @@ -4,8 +4,13 @@ title: booleanOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Compares two geometries of the same dimension and returns true if their intersection set results in a geometry diff --git a/versioned_docs/version-7.0.0/api/booleanParallel.mdx b/versioned_docs/version-7.0.0/api/booleanParallel.mdx index a30cf984..e4a7fe75 100644 --- a/versioned_docs/version-7.0.0/api/booleanParallel.mdx +++ b/versioned_docs/version-7.0.0/api/booleanParallel.mdx @@ -4,8 +4,13 @@ title: booleanParallel import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2` diff --git a/versioned_docs/version-7.0.0/api/booleanPointInPolygon.mdx b/versioned_docs/version-7.0.0/api/booleanPointInPolygon.mdx index 48c8c8d2..a172066c 100644 --- a/versioned_docs/version-7.0.0/api/booleanPointInPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/booleanPointInPolygon.mdx @@ -4,8 +4,13 @@ title: booleanPointInPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) and determines if the point diff --git a/versioned_docs/version-7.0.0/api/booleanPointOnLine.mdx b/versioned_docs/version-7.0.0/api/booleanPointOnLine.mdx index dcfdbfa1..a82d07ca 100644 --- a/versioned_docs/version-7.0.0/api/booleanPointOnLine.mdx +++ b/versioned_docs/version-7.0.0/api/booleanPointOnLine.mdx @@ -4,8 +4,13 @@ title: booleanPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns true if a point is on a line. Accepts a optional parameter to ignore the diff --git a/versioned_docs/version-7.0.0/api/booleanTouches.mdx b/versioned_docs/version-7.0.0/api/booleanTouches.mdx index 59ccdf23..492c88ce 100644 --- a/versioned_docs/version-7.0.0/api/booleanTouches.mdx +++ b/versioned_docs/version-7.0.0/api/booleanTouches.mdx @@ -4,8 +4,13 @@ title: booleanTouches import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-touches true if none of the points common to both geometries diff --git a/versioned_docs/version-7.0.0/api/booleanValid.mdx b/versioned_docs/version-7.0.0/api/booleanValid.mdx index 1305686f..9cbff231 100644 --- a/versioned_docs/version-7.0.0/api/booleanValid.mdx +++ b/versioned_docs/version-7.0.0/api/booleanValid.mdx @@ -4,8 +4,13 @@ title: booleanValid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description booleanValid checks if the geometry is a valid according to the OGC Simple Feature Specification. diff --git a/versioned_docs/version-7.0.0/api/booleanWithin.mdx b/versioned_docs/version-7.0.0/api/booleanWithin.mdx index 552dca46..105bc2f1 100644 --- a/versioned_docs/version-7.0.0/api/booleanWithin.mdx +++ b/versioned_docs/version-7.0.0/api/booleanWithin.mdx @@ -4,8 +4,13 @@ title: booleanWithin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-within returns true if the first geometry is completely within the second geometry. diff --git a/versioned_docs/version-7.0.0/api/buffer.mdx b/versioned_docs/version-7.0.0/api/buffer.mdx index 1569c00e..9af99141 100644 --- a/versioned_docs/version-7.0.0/api/buffer.mdx +++ b/versioned_docs/version-7.0.0/api/buffer.mdx @@ -4,8 +4,13 @@ title: buffer import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. diff --git a/versioned_docs/version-7.0.0/api/center.mdx b/versioned_docs/version-7.0.0/api/center.mdx index a20269f6..4f5f248f 100644 --- a/versioned_docs/version-7.0.0/api/center.mdx +++ b/versioned_docs/version-7.0.0/api/center.mdx @@ -4,8 +4,13 @@ title: center import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the absolute center point of all features. diff --git a/versioned_docs/version-7.0.0/api/centerMean.mdx b/versioned_docs/version-7.0.0/api/centerMean.mdx index a8816f0d..ff7d518c 100644 --- a/versioned_docs/version-7.0.0/api/centerMean.mdx +++ b/versioned_docs/version-7.0.0/api/centerMean.mdx @@ -4,8 +4,13 @@ title: centerMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the mean center. Can be weighted. diff --git a/versioned_docs/version-7.0.0/api/centerMedian.mdx b/versioned_docs/version-7.0.0/api/centerMedian.mdx index 1ba0ca72..818c2ae6 100644 --- a/versioned_docs/version-7.0.0/api/centerMedian.mdx +++ b/versioned_docs/version-7.0.0/api/centerMedian.mdx @@ -4,8 +4,13 @@ title: centerMedian import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of points and calculates the median center, diff --git a/versioned_docs/version-7.0.0/api/centerOfMass.mdx b/versioned_docs/version-7.0.0/api/centerOfMass.mdx index 36be1089..b6aa168d 100644 --- a/versioned_docs/version-7.0.0/api/centerOfMass.mdx +++ b/versioned_docs/version-7.0.0/api/centerOfMass.mdx @@ -4,8 +4,13 @@ title: centerOfMass import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns its [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) using this formula: [Centroid of Polygon](https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon). diff --git a/versioned_docs/version-7.0.0/api/centroid.mdx b/versioned_docs/version-7.0.0/api/centroid.mdx index 637b92d3..97b6ded0 100644 --- a/versioned_docs/version-7.0.0/api/centroid.mdx +++ b/versioned_docs/version-7.0.0/api/centroid.mdx @@ -4,8 +4,13 @@ title: centroid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Computes the centroid as the mean of all vertices within the object. diff --git a/versioned_docs/version-7.0.0/api/circle.mdx b/versioned_docs/version-7.0.0/api/circle.mdx index 42f3e213..67a2d0c7 100644 --- a/versioned_docs/version-7.0.0/api/circle.mdx +++ b/versioned_docs/version-7.0.0/api/circle.mdx @@ -4,8 +4,13 @@ title: circle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision. diff --git a/versioned_docs/version-7.0.0/api/cleanCoords.mdx b/versioned_docs/version-7.0.0/api/cleanCoords.mdx index 57062d5b..57766b23 100644 --- a/versioned_docs/version-7.0.0/api/cleanCoords.mdx +++ b/versioned_docs/version-7.0.0/api/cleanCoords.mdx @@ -4,8 +4,13 @@ title: cleanCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Removes redundant coordinates from any GeoJSON Geometry. diff --git a/versioned_docs/version-7.0.0/api/clone.mdx b/versioned_docs/version-7.0.0/api/clone.mdx index 34e86b9b..0c88ae96 100644 --- a/versioned_docs/version-7.0.0/api/clone.mdx +++ b/versioned_docs/version-7.0.0/api/clone.mdx @@ -4,8 +4,13 @@ title: clone import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'. diff --git a/versioned_docs/version-7.0.0/api/clusterEach.mdx b/versioned_docs/version-7.0.0/api/clusterEach.mdx index 711af2ed..98db9cbb 100644 --- a/versioned_docs/version-7.0.0/api/clusterEach.mdx +++ b/versioned_docs/version-7.0.0/api/clusterEach.mdx @@ -4,8 +4,13 @@ title: clusterEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description clusterEach diff --git a/versioned_docs/version-7.0.0/api/clusterReduce.mdx b/versioned_docs/version-7.0.0/api/clusterReduce.mdx index fb8192ec..916ce6e2 100644 --- a/versioned_docs/version-7.0.0/api/clusterReduce.mdx +++ b/versioned_docs/version-7.0.0/api/clusterReduce.mdx @@ -4,8 +4,13 @@ title: clusterReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce clusters in GeoJSON Features, similar to Array.reduce() diff --git a/versioned_docs/version-7.0.0/api/clustersDbscan.mdx b/versioned_docs/version-7.0.0/api/clustersDbscan.mdx index f7335b38..2b76409d 100644 --- a/versioned_docs/version-7.0.0/api/clustersDbscan.mdx +++ b/versioned_docs/version-7.0.0/api/clustersDbscan.mdx @@ -4,8 +4,13 @@ title: clustersDbscan import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters according to [DBSCAN's](https://en.wikipedia.org/wiki/DBSCAN) data clustering algorithm. diff --git a/versioned_docs/version-7.0.0/api/clustersKmeans.mdx b/versioned_docs/version-7.0.0/api/clustersKmeans.mdx index 963f9e2a..f595eb49 100644 --- a/versioned_docs/version-7.0.0/api/clustersKmeans.mdx +++ b/versioned_docs/version-7.0.0/api/clustersKmeans.mdx @@ -4,8 +4,13 @@ title: clustersKmeans import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters using the k-mean . diff --git a/versioned_docs/version-7.0.0/api/collect.mdx b/versioned_docs/version-7.0.0/api/collect.mdx index 3953dbd2..dd6e11a3 100644 --- a/versioned_docs/version-7.0.0/api/collect.mdx +++ b/versioned_docs/version-7.0.0/api/collect.mdx @@ -4,8 +4,13 @@ title: collect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Merges a specified property from a FeatureCollection of points into a diff --git a/versioned_docs/version-7.0.0/api/collectionOf.mdx b/versioned_docs/version-7.0.0/api/collectionOf.mdx index b4049c69..c276c9a0 100644 --- a/versioned_docs/version-7.0.0/api/collectionOf.mdx +++ b/versioned_docs/version-7.0.0/api/collectionOf.mdx @@ -4,8 +4,13 @@ title: collectionOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inputs for Turf. diff --git a/versioned_docs/version-7.0.0/api/combine.mdx b/versioned_docs/version-7.0.0/api/combine.mdx index ac2c8e72..bc5d33aa 100644 --- a/versioned_docs/version-7.0.0/api/combine.mdx +++ b/versioned_docs/version-7.0.0/api/combine.mdx @@ -4,8 +4,13 @@ title: combine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Combines a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), or [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) features diff --git a/versioned_docs/version-7.0.0/api/concave.mdx b/versioned_docs/version-7.0.0/api/concave.mdx index 51cb1a71..d02b9e02 100644 --- a/versioned_docs/version-7.0.0/api/concave.mdx +++ b/versioned_docs/version-7.0.0/api/concave.mdx @@ -4,8 +4,13 @@ title: concave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a concave hull Polygon or MultiPolygon. diff --git a/versioned_docs/version-7.0.0/api/containsNumber.mdx b/versioned_docs/version-7.0.0/api/containsNumber.mdx index 96efae80..25602f8d 100644 --- a/versioned_docs/version-7.0.0/api/containsNumber.mdx +++ b/versioned_docs/version-7.0.0/api/containsNumber.mdx @@ -4,8 +4,13 @@ title: containsNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Checks if coordinates contains a number diff --git a/versioned_docs/version-7.0.0/api/convertArea.mdx b/versioned_docs/version-7.0.0/api/convertArea.mdx index d4417d7e..6c52a5e6 100644 --- a/versioned_docs/version-7.0.0/api/convertArea.mdx +++ b/versioned_docs/version-7.0.0/api/convertArea.mdx @@ -4,8 +4,13 @@ title: convertArea import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a area to the requested unit. diff --git a/versioned_docs/version-7.0.0/api/convertLength.mdx b/versioned_docs/version-7.0.0/api/convertLength.mdx index bbe82674..53823f70 100644 --- a/versioned_docs/version-7.0.0/api/convertLength.mdx +++ b/versioned_docs/version-7.0.0/api/convertLength.mdx @@ -4,8 +4,13 @@ title: convertLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a length to the requested unit. diff --git a/versioned_docs/version-7.0.0/api/convex.mdx b/versioned_docs/version-7.0.0/api/convex.mdx index f83b0785..24cf96e5 100644 --- a/versioned_docs/version-7.0.0/api/convex.mdx +++ b/versioned_docs/version-7.0.0/api/convex.mdx @@ -4,8 +4,13 @@ title: convex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a convex hull [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.0.0/api/coordAll.mdx b/versioned_docs/version-7.0.0/api/coordAll.mdx index 0751ff73..55ea2b9d 100644 --- a/versioned_docs/version-7.0.0/api/coordAll.mdx +++ b/versioned_docs/version-7.0.0/api/coordAll.mdx @@ -4,8 +4,13 @@ title: coordAll import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get all coordinates from any GeoJSON object. diff --git a/versioned_docs/version-7.0.0/api/coordEach.mdx b/versioned_docs/version-7.0.0/api/coordEach.mdx index 0e5c1fe5..ddc6a3d6 100644 --- a/versioned_docs/version-7.0.0/api/coordEach.mdx +++ b/versioned_docs/version-7.0.0/api/coordEach.mdx @@ -4,8 +4,13 @@ title: coordEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over coordinates in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.0.0/api/coordReduce.mdx b/versioned_docs/version-7.0.0/api/coordReduce.mdx index b59d720e..df50ca38 100644 --- a/versioned_docs/version-7.0.0/api/coordReduce.mdx +++ b/versioned_docs/version-7.0.0/api/coordReduce.mdx @@ -4,8 +4,13 @@ title: coordReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce coordinates in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-7.0.0/api/degreesToRadians.mdx b/versioned_docs/version-7.0.0/api/degreesToRadians.mdx index 76debaaa..b04b2eb0 100644 --- a/versioned_docs/version-7.0.0/api/degreesToRadians.mdx +++ b/versioned_docs/version-7.0.0/api/degreesToRadians.mdx @@ -4,8 +4,13 @@ title: degreesToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in degrees to radians diff --git a/versioned_docs/version-7.0.0/api/destination.mdx b/versioned_docs/version-7.0.0/api/destination.mdx index 6a5b03a8..e8ab6d48 100644 --- a/versioned_docs/version-7.0.0/api/destination.mdx +++ b/versioned_docs/version-7.0.0/api/destination.mdx @@ -4,8 +4,13 @@ title: destination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the location of a destination point given a distance in diff --git a/versioned_docs/version-7.0.0/api/difference.mdx b/versioned_docs/version-7.0.0/api/difference.mdx index a073e852..228352e9 100644 --- a/versioned_docs/version-7.0.0/api/difference.mdx +++ b/versioned_docs/version-7.0.0/api/difference.mdx @@ -4,8 +4,13 @@ title: difference import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the difference between multiple [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) by clipping the subsequent polygon from the first. diff --git a/versioned_docs/version-7.0.0/api/directionalMean.mdx b/versioned_docs/version-7.0.0/api/directionalMean.mdx index 21092328..b21a5888 100644 --- a/versioned_docs/version-7.0.0/api/directionalMean.mdx +++ b/versioned_docs/version-7.0.0/api/directionalMean.mdx @@ -4,8 +4,13 @@ title: directionalMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description This module calculate the average angle of a set of lines, measuring the trend of it. diff --git a/versioned_docs/version-7.0.0/api/dissolve.mdx b/versioned_docs/version-7.0.0/api/dissolve.mdx index 7c1be641..869f8895 100644 --- a/versioned_docs/version-7.0.0/api/dissolve.mdx +++ b/versioned_docs/version-7.0.0/api/dissolve.mdx @@ -4,8 +4,13 @@ title: dissolve import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Dissolves a FeatureCollection of [polygon](polygon) features, filtered by an optional property name:value. diff --git a/versioned_docs/version-7.0.0/api/distance.mdx b/versioned_docs/version-7.0.0/api/distance.mdx index 6f22f019..96550030 100644 --- a/versioned_docs/version-7.0.0/api/distance.mdx +++ b/versioned_docs/version-7.0.0/api/distance.mdx @@ -4,8 +4,13 @@ title: distance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, miles, or kilometers. diff --git a/versioned_docs/version-7.0.0/api/distanceWeight.mdx b/versioned_docs/version-7.0.0/api/distanceWeight.mdx index 1764cfd3..59675b2d 100644 --- a/versioned_docs/version-7.0.0/api/distanceWeight.mdx +++ b/versioned_docs/version-7.0.0/api/distanceWeight.mdx @@ -4,8 +4,13 @@ title: distanceWeight import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ### Parameters diff --git a/versioned_docs/version-7.0.0/api/ellipse.mdx b/versioned_docs/version-7.0.0/api/ellipse.mdx index 9f47e136..94ea1895 100644 --- a/versioned_docs/version-7.0.0/api/ellipse.mdx +++ b/versioned_docs/version-7.0.0/api/ellipse.mdx @@ -4,8 +4,13 @@ title: ellipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision. diff --git a/versioned_docs/version-7.0.0/api/envelope.mdx b/versioned_docs/version-7.0.0/api/envelope.mdx index 38946c08..b65dd459 100644 --- a/versioned_docs/version-7.0.0/api/envelope.mdx +++ b/versioned_docs/version-7.0.0/api/envelope.mdx @@ -4,8 +4,13 @@ title: envelope import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any number of features and returns a rectangular [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) that encompasses all vertices. diff --git a/versioned_docs/version-7.0.0/api/explode.mdx b/versioned_docs/version-7.0.0/api/explode.mdx index d561d368..3dcdcaeb 100644 --- a/versioned_docs/version-7.0.0/api/explode.mdx +++ b/versioned_docs/version-7.0.0/api/explode.mdx @@ -4,8 +4,13 @@ title: explode import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a feature or set of features and returns all positions as [points](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-7.0.0/api/feature.mdx b/versioned_docs/version-7.0.0/api/feature.mdx index 9e5e29d3..740b3de5 100644 --- a/versioned_docs/version-7.0.0/api/feature.mdx +++ b/versioned_docs/version-7.0.0/api/feature.mdx @@ -4,8 +4,13 @@ title: feature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Wraps a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) in a GeoJSON [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). diff --git a/versioned_docs/version-7.0.0/api/featureCollection.mdx b/versioned_docs/version-7.0.0/api/featureCollection.mdx index 88aa5cd9..ca6e9c18 100644 --- a/versioned_docs/version-7.0.0/api/featureCollection.mdx +++ b/versioned_docs/version-7.0.0/api/featureCollection.mdx @@ -4,8 +4,13 @@ title: featureCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more [Features](https://tools.ietf.org/html/rfc7946#section-3.2) and creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3). diff --git a/versioned_docs/version-7.0.0/api/featureEach.mdx b/versioned_docs/version-7.0.0/api/featureEach.mdx index f5dcd8a8..f22704a3 100644 --- a/versioned_docs/version-7.0.0/api/featureEach.mdx +++ b/versioned_docs/version-7.0.0/api/featureEach.mdx @@ -4,8 +4,13 @@ title: featureEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over features in any GeoJSON object, similar to diff --git a/versioned_docs/version-7.0.0/api/featureOf.mdx b/versioned_docs/version-7.0.0/api/featureOf.mdx index c4bbf3d9..56dfae98 100644 --- a/versioned_docs/version-7.0.0/api/featureOf.mdx +++ b/versioned_docs/version-7.0.0/api/featureOf.mdx @@ -4,8 +4,13 @@ title: featureOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) inputs for Turf. diff --git a/versioned_docs/version-7.0.0/api/featureReduce.mdx b/versioned_docs/version-7.0.0/api/featureReduce.mdx index 8280888d..0b16b874 100644 --- a/versioned_docs/version-7.0.0/api/featureReduce.mdx +++ b/versioned_docs/version-7.0.0/api/featureReduce.mdx @@ -4,8 +4,13 @@ title: featureReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.0.0/api/findPoint.mdx b/versioned_docs/version-7.0.0/api/findPoint.mdx index 79afbf8b..7a2bb740 100644 --- a/versioned_docs/version-7.0.0/api/findPoint.mdx +++ b/versioned_docs/version-7.0.0/api/findPoint.mdx @@ -4,8 +4,13 @@ title: findPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular Point from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-7.0.0/api/findSegment.mdx b/versioned_docs/version-7.0.0/api/findSegment.mdx index 30ef8dfb..27a7cf36 100644 --- a/versioned_docs/version-7.0.0/api/findSegment.mdx +++ b/versioned_docs/version-7.0.0/api/findSegment.mdx @@ -4,8 +4,13 @@ title: findSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-7.0.0/api/flatten.mdx b/versioned_docs/version-7.0.0/api/flatten.mdx index b65a6600..a1bf4cc3 100644 --- a/versioned_docs/version-7.0.0/api/flatten.mdx +++ b/versioned_docs/version-7.0.0/api/flatten.mdx @@ -4,8 +4,13 @@ title: flatten import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Flattens any [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) to a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten). diff --git a/versioned_docs/version-7.0.0/api/flattenEach.mdx b/versioned_docs/version-7.0.0/api/flattenEach.mdx index 1a2bb5a4..9a13fb28 100644 --- a/versioned_docs/version-7.0.0/api/flattenEach.mdx +++ b/versioned_docs/version-7.0.0/api/flattenEach.mdx @@ -4,8 +4,13 @@ title: flattenEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over flattened features in any GeoJSON object, similar to diff --git a/versioned_docs/version-7.0.0/api/flattenReduce.mdx b/versioned_docs/version-7.0.0/api/flattenReduce.mdx index 4f1d80dd..9868e073 100644 --- a/versioned_docs/version-7.0.0/api/flattenReduce.mdx +++ b/versioned_docs/version-7.0.0/api/flattenReduce.mdx @@ -4,8 +4,13 @@ title: flattenReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce flattened features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.0.0/api/flip.mdx b/versioned_docs/version-7.0.0/api/flip.mdx index 8dfb19dc..c90a8713 100644 --- a/versioned_docs/version-7.0.0/api/flip.mdx +++ b/versioned_docs/version-7.0.0/api/flip.mdx @@ -4,8 +4,13 @@ title: flip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`. diff --git a/versioned_docs/version-7.0.0/api/geojsonType.mdx b/versioned_docs/version-7.0.0/api/geojsonType.mdx index d342fa07..7744cb6e 100644 --- a/versioned_docs/version-7.0.0/api/geojsonType.mdx +++ b/versioned_docs/version-7.0.0/api/geojsonType.mdx @@ -4,8 +4,13 @@ title: geojsonType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of GeoJSON objects for Turf. diff --git a/versioned_docs/version-7.0.0/api/geomEach.mdx b/versioned_docs/version-7.0.0/api/geomEach.mdx index 9a073c2d..f916d6d1 100644 --- a/versioned_docs/version-7.0.0/api/geomEach.mdx +++ b/versioned_docs/version-7.0.0/api/geomEach.mdx @@ -4,8 +4,13 @@ title: geomEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over each geometry in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.0.0/api/geomReduce.mdx b/versioned_docs/version-7.0.0/api/geomReduce.mdx index 101034a8..f5b86a84 100644 --- a/versioned_docs/version-7.0.0/api/geomReduce.mdx +++ b/versioned_docs/version-7.0.0/api/geomReduce.mdx @@ -4,8 +4,13 @@ title: geomReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce geometry in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.0.0/api/geometry.mdx b/versioned_docs/version-7.0.0/api/geometry.mdx index cafae02a..c045d4b0 100644 --- a/versioned_docs/version-7.0.0/api/geometry.mdx +++ b/versioned_docs/version-7.0.0/api/geometry.mdx @@ -4,8 +4,13 @@ title: geometry import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) from a Geometry string type & coordinates. diff --git a/versioned_docs/version-7.0.0/api/geometryCollection.mdx b/versioned_docs/version-7.0.0/api/geometryCollection.mdx index 9adfcf6b..ea30107d 100644 --- a/versioned_docs/version-7.0.0/api/geometryCollection.mdx +++ b/versioned_docs/version-7.0.0/api/geometryCollection.mdx @@ -4,8 +4,13 @@ title: geometryCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\> based on a diff --git a/versioned_docs/version-7.0.0/api/getCluster.mdx b/versioned_docs/version-7.0.0/api/getCluster.mdx index deef155c..61cb258c 100644 --- a/versioned_docs/version-7.0.0/api/getCluster.mdx +++ b/versioned_docs/version-7.0.0/api/getCluster.mdx @@ -4,8 +4,13 @@ title: getCluster import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Cluster diff --git a/versioned_docs/version-7.0.0/api/getCoord.mdx b/versioned_docs/version-7.0.0/api/getCoord.mdx index 07a41450..52b32587 100644 --- a/versioned_docs/version-7.0.0/api/getCoord.mdx +++ b/versioned_docs/version-7.0.0/api/getCoord.mdx @@ -4,8 +4,13 @@ title: getCoord import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap a coordinate from a Point Feature, Geometry or a single coordinate. diff --git a/versioned_docs/version-7.0.0/api/getCoords.mdx b/versioned_docs/version-7.0.0/api/getCoords.mdx index 6c6bf396..9d79e434 100644 --- a/versioned_docs/version-7.0.0/api/getCoords.mdx +++ b/versioned_docs/version-7.0.0/api/getCoords.mdx @@ -4,8 +4,13 @@ title: getCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap coordinates from a Feature, Geometry Object or an Array diff --git a/versioned_docs/version-7.0.0/api/getGeom.mdx b/versioned_docs/version-7.0.0/api/getGeom.mdx index c17f8e1d..7a9a80b9 100644 --- a/versioned_docs/version-7.0.0/api/getGeom.mdx +++ b/versioned_docs/version-7.0.0/api/getGeom.mdx @@ -4,8 +4,13 @@ title: getGeom import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Geometry from Feature or Geometry Object diff --git a/versioned_docs/version-7.0.0/api/getType.mdx b/versioned_docs/version-7.0.0/api/getType.mdx index 1efae6ae..73b15ec9 100644 --- a/versioned_docs/version-7.0.0/api/getType.mdx +++ b/versioned_docs/version-7.0.0/api/getType.mdx @@ -4,8 +4,13 @@ title: getType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get GeoJSON object's type, Geometry type is prioritize. diff --git a/versioned_docs/version-7.0.0/api/greatCircle.mdx b/versioned_docs/version-7.0.0/api/greatCircle.mdx index d5405bb8..62a27ef7 100644 --- a/versioned_docs/version-7.0.0/api/greatCircle.mdx +++ b/versioned_docs/version-7.0.0/api/greatCircle.mdx @@ -4,8 +4,13 @@ title: greatCircle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculate great circles routes as [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5). diff --git a/versioned_docs/version-7.0.0/api/hexGrid.mdx b/versioned_docs/version-7.0.0/api/hexGrid.mdx index 7e678d9e..f779d1d5 100644 --- a/versioned_docs/version-7.0.0/api/hexGrid.mdx +++ b/versioned_docs/version-7.0.0/api/hexGrid.mdx @@ -4,8 +4,13 @@ title: hexGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and the diameter of the cell and returns a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of flat-topped diff --git a/versioned_docs/version-7.0.0/api/interpolate.mdx b/versioned_docs/version-7.0.0/api/interpolate.mdx index 04694454..2a72dd19 100644 --- a/versioned_docs/version-7.0.0/api/interpolate.mdx +++ b/versioned_docs/version-7.0.0/api/interpolate.mdx @@ -4,8 +4,13 @@ title: interpolate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting). diff --git a/versioned_docs/version-7.0.0/api/intersect.mdx b/versioned_docs/version-7.0.0/api/intersect.mdx index 292c7ce1..a4e215a8 100644 --- a/versioned_docs/version-7.0.0/api/intersect.mdx +++ b/versioned_docs/version-7.0.0/api/intersect.mdx @@ -4,8 +4,13 @@ title: intersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [multi-polygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) geometries and diff --git a/versioned_docs/version-7.0.0/api/isNumber.mdx b/versioned_docs/version-7.0.0/api/isNumber.mdx index 95bb4d13..66d178a4 100644 --- a/versioned_docs/version-7.0.0/api/isNumber.mdx +++ b/versioned_docs/version-7.0.0/api/isNumber.mdx @@ -4,8 +4,13 @@ title: isNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isNumber diff --git a/versioned_docs/version-7.0.0/api/isObject.mdx b/versioned_docs/version-7.0.0/api/isObject.mdx index 5b98f8ed..3c6e1036 100644 --- a/versioned_docs/version-7.0.0/api/isObject.mdx +++ b/versioned_docs/version-7.0.0/api/isObject.mdx @@ -4,8 +4,13 @@ title: isObject import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isObject diff --git a/versioned_docs/version-7.0.0/api/isobands.mdx b/versioned_docs/version-7.0.0/api/isobands.mdx index 2d66b510..e17ca0bd 100644 --- a/versioned_docs/version-7.0.0/api/isobands.mdx +++ b/versioned_docs/version-7.0.0/api/isobands.mdx @@ -4,8 +4,13 @@ title: isobands import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a square or rectangular grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-7.0.0/api/isolines.mdx b/versioned_docs/version-7.0.0/api/isolines.mdx index edfd771b..e3ccb536 100644 --- a/versioned_docs/version-7.0.0/api/isolines.mdx +++ b/versioned_docs/version-7.0.0/api/isolines.mdx @@ -4,8 +4,13 @@ title: isolines import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-7.0.0/api/kinks.mdx b/versioned_docs/version-7.0.0/api/kinks.mdx index c9f4bfe7..0c561323 100644 --- a/versioned_docs/version-7.0.0/api/kinks.mdx +++ b/versioned_docs/version-7.0.0/api/kinks.mdx @@ -4,8 +4,13 @@ title: kinks import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [linestring](https://tools.ietf.org/html/rfc7946#section-3.1.4), [multi-linestring](https://tools.ietf.org/html/rfc7946#section-3.1.5), diff --git a/versioned_docs/version-7.0.0/api/length.mdx b/versioned_docs/version-7.0.0/api/length.mdx index d99b4342..fe2fcf58 100644 --- a/versioned_docs/version-7.0.0/api/length.mdx +++ b/versioned_docs/version-7.0.0/api/length.mdx @@ -4,8 +4,13 @@ title: length import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) and measures its length in the specified units, [(Multi)Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)'s distance are ignored. diff --git a/versioned_docs/version-7.0.0/api/lengthToDegrees.mdx b/versioned_docs/version-7.0.0/api/lengthToDegrees.mdx index d088c5c4..978c5624 100644 --- a/versioned_docs/version-7.0.0/api/lengthToDegrees.mdx +++ b/versioned_docs/version-7.0.0/api/lengthToDegrees.mdx @@ -4,8 +4,13 @@ title: lengthToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees diff --git a/versioned_docs/version-7.0.0/api/lengthToRadians.mdx b/versioned_docs/version-7.0.0/api/lengthToRadians.mdx index f0292908..6bc34762 100644 --- a/versioned_docs/version-7.0.0/api/lengthToRadians.mdx +++ b/versioned_docs/version-7.0.0/api/lengthToRadians.mdx @@ -4,8 +4,13 @@ title: lengthToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians diff --git a/versioned_docs/version-7.0.0/api/lineArc.mdx b/versioned_docs/version-7.0.0/api/lineArc.mdx index eb08ff69..b4c499f4 100644 --- a/versioned_docs/version-7.0.0/api/lineArc.mdx +++ b/versioned_docs/version-7.0.0/api/lineArc.mdx @@ -4,8 +4,13 @@ title: lineArc import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; diff --git a/versioned_docs/version-7.0.0/api/lineChunk.mdx b/versioned_docs/version-7.0.0/api/lineChunk.mdx index a6c22dfc..91cca41e 100644 --- a/versioned_docs/version-7.0.0/api/lineChunk.mdx +++ b/versioned_docs/version-7.0.0/api/lineChunk.mdx @@ -4,8 +4,13 @@ title: lineChunk import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Divides a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) into chunks of a specified length. diff --git a/versioned_docs/version-7.0.0/api/lineEach.mdx b/versioned_docs/version-7.0.0/api/lineEach.mdx index a8d178c9..1249e56b 100644 --- a/versioned_docs/version-7.0.0/api/lineEach.mdx +++ b/versioned_docs/version-7.0.0/api/lineEach.mdx @@ -4,8 +4,13 @@ title: lineEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries, diff --git a/versioned_docs/version-7.0.0/api/lineIntersect.mdx b/versioned_docs/version-7.0.0/api/lineIntersect.mdx index 571653d2..8c94bbcf 100644 --- a/versioned_docs/version-7.0.0/api/lineIntersect.mdx +++ b/versioned_docs/version-7.0.0/api/lineIntersect.mdx @@ -4,8 +4,13 @@ title: lineIntersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). diff --git a/versioned_docs/version-7.0.0/api/lineOffset.mdx b/versioned_docs/version-7.0.0/api/lineOffset.mdx index a58b65bc..c300868e 100644 --- a/versioned_docs/version-7.0.0/api/lineOffset.mdx +++ b/versioned_docs/version-7.0.0/api/lineOffset.mdx @@ -4,8 +4,13 @@ title: lineOffset import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) at offset by the specified distance. diff --git a/versioned_docs/version-7.0.0/api/lineOverlap.mdx b/versioned_docs/version-7.0.0/api/lineOverlap.mdx index cbf4151f..2d27c9d2 100644 --- a/versioned_docs/version-7.0.0/api/lineOverlap.mdx +++ b/versioned_docs/version-7.0.0/api/lineOverlap.mdx @@ -4,8 +4,13 @@ title: lineOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon and returns the overlapping lines between both features. diff --git a/versioned_docs/version-7.0.0/api/lineReduce.mdx b/versioned_docs/version-7.0.0/api/lineReduce.mdx index a10d4848..4626e5eb 100644 --- a/versioned_docs/version-7.0.0/api/lineReduce.mdx +++ b/versioned_docs/version-7.0.0/api/lineReduce.mdx @@ -4,8 +4,13 @@ title: lineReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.0.0/api/lineSegment.mdx b/versioned_docs/version-7.0.0/api/lineSegment.mdx index b8b71a04..d0b74b01 100644 --- a/versioned_docs/version-7.0.0/api/lineSegment.mdx +++ b/versioned_docs/version-7.0.0/api/lineSegment.mdx @@ -4,8 +4,13 @@ title: lineSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of 2-vertex [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) segments from a diff --git a/versioned_docs/version-7.0.0/api/lineSlice.mdx b/versioned_docs/version-7.0.0/api/lineSlice.mdx index 6fa1ffa6..8d74b043 100644 --- a/versioned_docs/version-7.0.0/api/lineSlice.mdx +++ b/versioned_docs/version-7.0.0/api/lineSlice.mdx @@ -4,8 +4,13 @@ title: lineSlice import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), and a stop point diff --git a/versioned_docs/version-7.0.0/api/lineSliceAlong.mdx b/versioned_docs/version-7.0.0/api/lineSliceAlong.mdx index 309f54a9..ed2e16ad 100644 --- a/versioned_docs/version-7.0.0/api/lineSliceAlong.mdx +++ b/versioned_docs/version-7.0.0/api/lineSliceAlong.mdx @@ -4,8 +4,13 @@ title: lineSliceAlong import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a specified distance along the line to a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-7.0.0/api/lineSplit.mdx b/versioned_docs/version-7.0.0/api/lineSplit.mdx index 8167dbeb..10274bf6 100644 --- a/versioned_docs/version-7.0.0/api/lineSplit.mdx +++ b/versioned_docs/version-7.0.0/api/lineSplit.mdx @@ -4,8 +4,13 @@ title: lineSplit import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Split a LineString by another GeoJSON Feature. diff --git a/versioned_docs/version-7.0.0/api/lineString.mdx b/versioned_docs/version-7.0.0/api/lineString.mdx index 8c0dc22c..dd256bc5 100644 --- a/versioned_docs/version-7.0.0/api/lineString.mdx +++ b/versioned_docs/version-7.0.0/api/lineString.mdx @@ -4,8 +4,13 @@ title: lineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of Positions. diff --git a/versioned_docs/version-7.0.0/api/lineStrings.mdx b/versioned_docs/version-7.0.0/api/lineStrings.mdx index 62406b85..0f313ce3 100644 --- a/versioned_docs/version-7.0.0/api/lineStrings.mdx +++ b/versioned_docs/version-7.0.0/api/lineStrings.mdx @@ -4,8 +4,13 @@ title: lineStrings import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of LineString coordinates. diff --git a/versioned_docs/version-7.0.0/api/lineToPolygon.mdx b/versioned_docs/version-7.0.0/api/lineToPolygon.mdx index 1c28fc94..d92c0e66 100644 --- a/versioned_docs/version-7.0.0/api/lineToPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/lineToPolygon.mdx @@ -4,8 +4,13 @@ title: lineToPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts (Multi)LineString(s) to Polygon(s). diff --git a/versioned_docs/version-7.0.0/api/mask.mdx b/versioned_docs/version-7.0.0/api/mask.mdx index 57823849..a31cec48 100644 --- a/versioned_docs/version-7.0.0/api/mask.mdx +++ b/versioned_docs/version-7.0.0/api/mask.mdx @@ -4,8 +4,13 @@ title: mask import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any type of [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) and an optional mask and returns a [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) exterior ring with holes. diff --git a/versioned_docs/version-7.0.0/api/mean.mdx b/versioned_docs/version-7.0.0/api/mean.mdx index a543462e..839730cb 100644 --- a/versioned_docs/version-7.0.0/api/mean.mdx +++ b/versioned_docs/version-7.0.0/api/mean.mdx @@ -4,8 +4,13 @@ title: mean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get mean of a list diff --git a/versioned_docs/version-7.0.0/api/midpoint.mdx b/versioned_docs/version-7.0.0/api/midpoint.mdx index 6c6f4e64..f9403818 100644 --- a/versioned_docs/version-7.0.0/api/midpoint.mdx +++ b/versioned_docs/version-7.0.0/api/midpoint.mdx @@ -4,8 +4,13 @@ title: midpoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a point midway between them. diff --git a/versioned_docs/version-7.0.0/api/moranIndex.mdx b/versioned_docs/version-7.0.0/api/moranIndex.mdx index aa3d1690..8697c425 100644 --- a/versioned_docs/version-7.0.0/api/moranIndex.mdx +++ b/versioned_docs/version-7.0.0/api/moranIndex.mdx @@ -4,8 +4,13 @@ title: moranIndex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moran's I measures patterns of attribute values associated with features. diff --git a/versioned_docs/version-7.0.0/api/multiLineString.mdx b/versioned_docs/version-7.0.0/api/multiLineString.mdx index a59b3c00..0aef3202 100644 --- a/versioned_docs/version-7.0.0/api/multiLineString.mdx +++ b/versioned_docs/version-7.0.0/api/multiLineString.mdx @@ -4,8 +4,13 @@ title: multiLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\> based on a diff --git a/versioned_docs/version-7.0.0/api/multiPoint.mdx b/versioned_docs/version-7.0.0/api/multiPoint.mdx index 34010a4c..a983545b 100644 --- a/versioned_docs/version-7.0.0/api/multiPoint.mdx +++ b/versioned_docs/version-7.0.0/api/multiPoint.mdx @@ -4,8 +4,13 @@ title: multiPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\> based on a diff --git a/versioned_docs/version-7.0.0/api/multiPolygon.mdx b/versioned_docs/version-7.0.0/api/multiPolygon.mdx index 4f2bd283..970f7738 100644 --- a/versioned_docs/version-7.0.0/api/multiPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/multiPolygon.mdx @@ -4,8 +4,13 @@ title: multiPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\> based on a diff --git a/versioned_docs/version-7.0.0/api/nearestPoint.mdx b/versioned_docs/version-7.0.0/api/nearestPoint.mdx index 33d52fe4..80aa7bf1 100644 --- a/versioned_docs/version-7.0.0/api/nearestPoint.mdx +++ b/versioned_docs/version-7.0.0/api/nearestPoint.mdx @@ -4,8 +4,13 @@ title: nearestPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a reference [point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a FeatureCollection of Features diff --git a/versioned_docs/version-7.0.0/api/nearestPointOnLine.mdx b/versioned_docs/version-7.0.0/api/nearestPointOnLine.mdx index f1236709..b2d2f0e4 100644 --- a/versioned_docs/version-7.0.0/api/nearestPointOnLine.mdx +++ b/versioned_docs/version-7.0.0/api/nearestPointOnLine.mdx @@ -4,8 +4,13 @@ title: nearestPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and calculates the closest Point on the (Multi)LineString. diff --git a/versioned_docs/version-7.0.0/api/nearestPointToLine.mdx b/versioned_docs/version-7.0.0/api/nearestPointToLine.mdx index 5ab15271..c0b58f7a 100644 --- a/versioned_docs/version-7.0.0/api/nearestPointToLine.mdx +++ b/versioned_docs/version-7.0.0/api/nearestPointToLine.mdx @@ -4,8 +4,13 @@ title: nearestPointToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the closest [point](https://tools.ietf.org/html/rfc7946#section-3.1.2), of a [collection](https://tools.ietf.org/html/rfc7946#section-3.3) of points, diff --git a/versioned_docs/version-7.0.0/api/pNormDistance.mdx b/versioned_docs/version-7.0.0/api/pNormDistance.mdx index f5097df5..a8f8c5dc 100644 --- a/versioned_docs/version-7.0.0/api/pNormDistance.mdx +++ b/versioned_docs/version-7.0.0/api/pNormDistance.mdx @@ -4,8 +4,13 @@ title: pNormDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description calcualte the Minkowski p-norm distance between two features. diff --git a/versioned_docs/version-7.0.0/api/planepoint.mdx b/versioned_docs/version-7.0.0/api/planepoint.mdx index f12673be..750af364 100644 --- a/versioned_docs/version-7.0.0/api/planepoint.mdx +++ b/versioned_docs/version-7.0.0/api/planepoint.mdx @@ -4,8 +4,13 @@ title: planepoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a triangular plane as a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) diff --git a/versioned_docs/version-7.0.0/api/point.mdx b/versioned_docs/version-7.0.0/api/point.mdx index d9b8ceeb..da304234 100644 --- a/versioned_docs/version-7.0.0/api/point.mdx +++ b/versioned_docs/version-7.0.0/api/point.mdx @@ -4,8 +4,13 @@ title: point import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from a Position. diff --git a/versioned_docs/version-7.0.0/api/pointGrid.mdx b/versioned_docs/version-7.0.0/api/pointGrid.mdx index 505a2d9e..dcd4f8eb 100644 --- a/versioned_docs/version-7.0.0/api/pointGrid.mdx +++ b/versioned_docs/version-7.0.0/api/pointGrid.mdx @@ -4,8 +4,13 @@ title: pointGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) grid from a bounding box, [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) or [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). diff --git a/versioned_docs/version-7.0.0/api/pointOnFeature.mdx b/versioned_docs/version-7.0.0/api/pointOnFeature.mdx index 4df04799..2eedb19a 100644 --- a/versioned_docs/version-7.0.0/api/pointOnFeature.mdx +++ b/versioned_docs/version-7.0.0/api/pointOnFeature.mdx @@ -4,8 +4,13 @@ title: pointOnFeature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) guaranteed to be on the surface of the feature. diff --git a/versioned_docs/version-7.0.0/api/pointToLineDistance.mdx b/versioned_docs/version-7.0.0/api/pointToLineDistance.mdx index 311c6379..9571c7a3 100644 --- a/versioned_docs/version-7.0.0/api/pointToLineDistance.mdx +++ b/versioned_docs/version-7.0.0/api/pointToLineDistance.mdx @@ -4,8 +4,13 @@ title: pointToLineDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the minimum distance between a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), being the distance from a line the diff --git a/versioned_docs/version-7.0.0/api/points.mdx b/versioned_docs/version-7.0.0/api/points.mdx index 63aa23b8..ef130722 100644 --- a/versioned_docs/version-7.0.0/api/points.mdx +++ b/versioned_docs/version-7.0.0/api/points.mdx @@ -4,8 +4,13 @@ title: points import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Point coordinates. diff --git a/versioned_docs/version-7.0.0/api/pointsWithinPolygon.mdx b/versioned_docs/version-7.0.0/api/pointsWithinPolygon.mdx index c22f9358..cdb7ba43 100644 --- a/versioned_docs/version-7.0.0/api/pointsWithinPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/pointsWithinPolygon.mdx @@ -4,8 +4,13 @@ title: pointsWithinPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds [Points](https://tools.ietf.org/html/rfc7946#section-3.1.2) or [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) coordinate positions that fall within [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.0.0/api/polygon.mdx b/versioned_docs/version-7.0.0/api/polygon.mdx index 6ba3c362..d58e4c31 100644 --- a/versioned_docs/version-7.0.0/api/polygon.mdx +++ b/versioned_docs/version-7.0.0/api/polygon.mdx @@ -4,8 +4,13 @@ title: polygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of LinearRings. diff --git a/versioned_docs/version-7.0.0/api/polygonSmooth.mdx b/versioned_docs/version-7.0.0/api/polygonSmooth.mdx index 4133075d..a2a8ef0a 100644 --- a/versioned_docs/version-7.0.0/api/polygonSmooth.mdx +++ b/versioned_docs/version-7.0.0/api/polygonSmooth.mdx @@ -4,8 +4,13 @@ title: polygonSmooth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Smooths a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7). Based on [Chaikin's algorithm](http://graphics.cs.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html). diff --git a/versioned_docs/version-7.0.0/api/polygonTangents.mdx b/versioned_docs/version-7.0.0/api/polygonTangents.mdx index 72f78c88..7bb58eea 100644 --- a/versioned_docs/version-7.0.0/api/polygonTangents.mdx +++ b/versioned_docs/version-7.0.0/api/polygonTangents.mdx @@ -4,8 +4,13 @@ title: polygonTangents import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the tangents of a [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) from a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-7.0.0/api/polygonToLine.mdx b/versioned_docs/version-7.0.0/api/polygonToLine.mdx index e20319a7..a4e32818 100644 --- a/versioned_docs/version-7.0.0/api/polygonToLine.mdx +++ b/versioned_docs/version-7.0.0/api/polygonToLine.mdx @@ -4,8 +4,13 @@ title: polygonToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) to [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) to a diff --git a/versioned_docs/version-7.0.0/api/polygonize.mdx b/versioned_docs/version-7.0.0/api/polygonize.mdx index a092a155..ae74d231 100644 --- a/versioned_docs/version-7.0.0/api/polygonize.mdx +++ b/versioned_docs/version-7.0.0/api/polygonize.mdx @@ -4,8 +4,13 @@ title: polygonize import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Polygonizes [(Multi)LineString(s)](https://tools.ietf.org/html/rfc7946#section-3.1.4) into [Polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.0.0/api/polygons.mdx b/versioned_docs/version-7.0.0/api/polygons.mdx index 6da5aa0a..2adfce00 100644 --- a/versioned_docs/version-7.0.0/api/polygons.mdx +++ b/versioned_docs/version-7.0.0/api/polygons.mdx @@ -4,8 +4,13 @@ title: polygons import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Polygon coordinates. diff --git a/versioned_docs/version-7.0.0/api/propEach.mdx b/versioned_docs/version-7.0.0/api/propEach.mdx index 76b5f8c3..03758577 100644 --- a/versioned_docs/version-7.0.0/api/propEach.mdx +++ b/versioned_docs/version-7.0.0/api/propEach.mdx @@ -4,8 +4,13 @@ title: propEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over properties in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.0.0/api/propReduce.mdx b/versioned_docs/version-7.0.0/api/propReduce.mdx index 1958c44e..0045433e 100644 --- a/versioned_docs/version-7.0.0/api/propReduce.mdx +++ b/versioned_docs/version-7.0.0/api/propReduce.mdx @@ -4,8 +4,13 @@ title: propReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce properties in any GeoJSON object into a single value, diff --git a/versioned_docs/version-7.0.0/api/pt.mdx b/versioned_docs/version-7.0.0/api/pt.mdx index 983017c2..23e7985e 100644 --- a/versioned_docs/version-7.0.0/api/pt.mdx +++ b/versioned_docs/version-7.0.0/api/pt.mdx @@ -4,8 +4,13 @@ title: pt import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Translate Properties to final Point, priorities: diff --git a/versioned_docs/version-7.0.0/api/quadratAnalysis.mdx b/versioned_docs/version-7.0.0/api/quadratAnalysis.mdx index 49103125..406196df 100644 --- a/versioned_docs/version-7.0.0/api/quadratAnalysis.mdx +++ b/versioned_docs/version-7.0.0/api/quadratAnalysis.mdx @@ -4,8 +4,13 @@ title: quadratAnalysis import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts diff --git a/versioned_docs/version-7.0.0/api/radiansToDegrees.mdx b/versioned_docs/version-7.0.0/api/radiansToDegrees.mdx index b5865f4d..876db7dd 100644 --- a/versioned_docs/version-7.0.0/api/radiansToDegrees.mdx +++ b/versioned_docs/version-7.0.0/api/radiansToDegrees.mdx @@ -4,8 +4,13 @@ title: radiansToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in radians to degrees diff --git a/versioned_docs/version-7.0.0/api/radiansToLength.mdx b/versioned_docs/version-7.0.0/api/radiansToLength.mdx index 6f6660ae..9df3d968 100644 --- a/versioned_docs/version-7.0.0/api/radiansToLength.mdx +++ b/versioned_docs/version-7.0.0/api/radiansToLength.mdx @@ -4,8 +4,13 @@ title: radiansToLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. diff --git a/versioned_docs/version-7.0.0/api/randomLineString.mdx b/versioned_docs/version-7.0.0/api/randomLineString.mdx index 17b61791..61538b72 100644 --- a/versioned_docs/version-7.0.0/api/randomLineString.mdx +++ b/versioned_docs/version-7.0.0/api/randomLineString.mdx @@ -4,8 +4,13 @@ title: randomLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4). diff --git a/versioned_docs/version-7.0.0/api/randomPoint.mdx b/versioned_docs/version-7.0.0/api/randomPoint.mdx index b0597990..39e696ea 100644 --- a/versioned_docs/version-7.0.0/api/randomPoint.mdx +++ b/versioned_docs/version-7.0.0/api/randomPoint.mdx @@ -4,8 +4,13 @@ title: randomPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [point](point). diff --git a/versioned_docs/version-7.0.0/api/randomPolygon.mdx b/versioned_docs/version-7.0.0/api/randomPolygon.mdx index 15edd903..695b53f7 100644 --- a/versioned_docs/version-7.0.0/api/randomPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/randomPolygon.mdx @@ -4,8 +4,13 @@ title: randomPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [polygon](polygon). diff --git a/versioned_docs/version-7.0.0/api/randomPosition.mdx b/versioned_docs/version-7.0.0/api/randomPosition.mdx index f1937ade..58562925 100644 --- a/versioned_docs/version-7.0.0/api/randomPosition.mdx +++ b/versioned_docs/version-7.0.0/api/randomPosition.mdx @@ -4,8 +4,13 @@ title: randomPosition import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random position within a [bounding box](https://tools.ietf.org/html/rfc7946#section-5). diff --git a/versioned_docs/version-7.0.0/api/rbush.mdx b/versioned_docs/version-7.0.0/api/rbush.mdx index 2743412c..c1838d8d 100644 --- a/versioned_docs/version-7.0.0/api/rbush.mdx +++ b/versioned_docs/version-7.0.0/api/rbush.mdx @@ -4,8 +4,13 @@ title: rbush import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index. diff --git a/versioned_docs/version-7.0.0/api/rewind.mdx b/versioned_docs/version-7.0.0/api/rewind.mdx index 5f64693f..b2de9308 100644 --- a/versioned_docs/version-7.0.0/api/rewind.mdx +++ b/versioned_docs/version-7.0.0/api/rewind.mdx @@ -4,8 +4,13 @@ title: rewind import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rewind [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) outer ring counterclockwise and inner rings clockwise (Uses [Shoelace Formula](http://en.wikipedia.org/wiki/Shoelace_formula)). diff --git a/versioned_docs/version-7.0.0/api/rhumbBearing.mdx b/versioned_docs/version-7.0.0/api/rhumbBearing.mdx index ac55351d..8ed45f27 100644 --- a/versioned_docs/version-7.0.0/api/rhumbBearing.mdx +++ b/versioned_docs/version-7.0.0/api/rhumbBearing.mdx @@ -4,8 +4,13 @@ title: rhumbBearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the bearing angle between them along a Rhumb line diff --git a/versioned_docs/version-7.0.0/api/rhumbDestination.mdx b/versioned_docs/version-7.0.0/api/rhumbDestination.mdx index be84d716..15713225 100644 --- a/versioned_docs/version-7.0.0/api/rhumbDestination.mdx +++ b/versioned_docs/version-7.0.0/api/rhumbDestination.mdx @@ -4,8 +4,13 @@ title: rhumbDestination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the destination [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) having travelled the given distance along a Rhumb line from the diff --git a/versioned_docs/version-7.0.0/api/rhumbDistance.mdx b/versioned_docs/version-7.0.0/api/rhumbDistance.mdx index 8f5a2a38..21851bc2 100644 --- a/versioned_docs/version-7.0.0/api/rhumbDistance.mdx +++ b/versioned_docs/version-7.0.0/api/rhumbDistance.mdx @@ -4,8 +4,13 @@ title: rhumbDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance along a rhumb line between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, diff --git a/versioned_docs/version-7.0.0/api/round.mdx b/versioned_docs/version-7.0.0/api/round.mdx index 88cc2896..9eea0511 100644 --- a/versioned_docs/version-7.0.0/api/round.mdx +++ b/versioned_docs/version-7.0.0/api/round.mdx @@ -4,8 +4,13 @@ title: round import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Round number to precision diff --git a/versioned_docs/version-7.0.0/api/sample.mdx b/versioned_docs/version-7.0.0/api/sample.mdx index 8a128fe0..4c98213a 100644 --- a/versioned_docs/version-7.0.0/api/sample.mdx +++ b/versioned_docs/version-7.0.0/api/sample.mdx @@ -4,8 +4,13 @@ title: sample import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a FeatureCollection with given number of [features](https://tools.ietf.org/html/rfc7946#section-3.2) at random. diff --git a/versioned_docs/version-7.0.0/api/sector.mdx b/versioned_docs/version-7.0.0/api/sector.mdx index e8c61c5e..9d952e63 100644 --- a/versioned_docs/version-7.0.0/api/sector.mdx +++ b/versioned_docs/version-7.0.0/api/sector.mdx @@ -4,8 +4,13 @@ title: sector import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular sector of a circle of given radius and center [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-7.0.0/api/segmentEach.mdx b/versioned_docs/version-7.0.0/api/segmentEach.mdx index 102f07ef..e295b143 100644 --- a/versioned_docs/version-7.0.0/api/segmentEach.mdx +++ b/versioned_docs/version-7.0.0/api/segmentEach.mdx @@ -4,8 +4,13 @@ title: segmentEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.0.0/api/segmentReduce.mdx b/versioned_docs/version-7.0.0/api/segmentReduce.mdx index 64c210aa..94642e7d 100644 --- a/versioned_docs/version-7.0.0/api/segmentReduce.mdx +++ b/versioned_docs/version-7.0.0/api/segmentReduce.mdx @@ -4,8 +4,13 @@ title: segmentReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-7.0.0/api/shortestPath.mdx b/versioned_docs/version-7.0.0/api/shortestPath.mdx index 811c19b8..243c9e99 100644 --- a/versioned_docs/version-7.0.0/api/shortestPath.mdx +++ b/versioned_docs/version-7.0.0/api/shortestPath.mdx @@ -4,8 +4,13 @@ title: shortestPath import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the shortest [path](https://tools.ietf.org/html/rfc7946#section-3.1.4) from [start](https://tools.ietf.org/html/rfc7946#section-3.1.2) to [end](https://tools.ietf.org/html/rfc7946#section-3.1.2) without colliding with diff --git a/versioned_docs/version-7.0.0/api/simplify.mdx b/versioned_docs/version-7.0.0/api/simplify.mdx index f8b216eb..1d622d22 100644 --- a/versioned_docs/version-7.0.0/api/simplify.mdx +++ b/versioned_docs/version-7.0.0/api/simplify.mdx @@ -4,8 +4,13 @@ title: simplify import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) object and returns a simplified version. Internally uses the 2d version of diff --git a/versioned_docs/version-7.0.0/api/square.mdx b/versioned_docs/version-7.0.0/api/square.mdx index 63695767..4d27ef01 100644 --- a/versioned_docs/version-7.0.0/api/square.mdx +++ b/versioned_docs/version-7.0.0/api/square.mdx @@ -4,8 +4,13 @@ title: square import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and calculates the minimum square bounding box that diff --git a/versioned_docs/version-7.0.0/api/squareGrid.mdx b/versioned_docs/version-7.0.0/api/squareGrid.mdx index 5152b9c4..637fd000 100644 --- a/versioned_docs/version-7.0.0/api/squareGrid.mdx +++ b/versioned_docs/version-7.0.0/api/squareGrid.mdx @@ -4,8 +4,13 @@ title: squareGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a square grid from a bounding box. diff --git a/versioned_docs/version-7.0.0/api/standardDeviationalEllipse.mdx b/versioned_docs/version-7.0.0/api/standardDeviationalEllipse.mdx index 358ae181..5647b079 100644 --- a/versioned_docs/version-7.0.0/api/standardDeviationalEllipse.mdx +++ b/versioned_docs/version-7.0.0/api/standardDeviationalEllipse.mdx @@ -4,8 +4,13 @@ title: standardDeviationalEllipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a standard deviational ellipse, diff --git a/versioned_docs/version-7.0.0/api/tag.mdx b/versioned_docs/version-7.0.0/api/tag.mdx index 8bc0e3cb..72cb12fc 100644 --- a/versioned_docs/version-7.0.0/api/tag.mdx +++ b/versioned_docs/version-7.0.0/api/tag.mdx @@ -4,8 +4,13 @@ title: tag import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a set of [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) and/or [multipolygons](https://tools.ietf.org/html/rfc7946#section-3.1.7) and performs a spatial join. diff --git a/versioned_docs/version-7.0.0/api/tesselate.mdx b/versioned_docs/version-7.0.0/api/tesselate.mdx index 17c67c88..aa9d36e0 100644 --- a/versioned_docs/version-7.0.0/api/tesselate.mdx +++ b/versioned_docs/version-7.0.0/api/tesselate.mdx @@ -4,8 +4,13 @@ title: tesselate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Tesselates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> into a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3)\<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)\> of triangles diff --git a/versioned_docs/version-7.0.0/api/tin.mdx b/versioned_docs/version-7.0.0/api/tin.mdx index 92ae9c77..4cbbcca4 100644 --- a/versioned_docs/version-7.0.0/api/tin.mdx +++ b/versioned_docs/version-7.0.0/api/tin.mdx @@ -4,8 +4,13 @@ title: tin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and creates a diff --git a/versioned_docs/version-7.0.0/api/toMercator.mdx b/versioned_docs/version-7.0.0/api/toMercator.mdx index 184e5add..be6ee056 100644 --- a/versioned_docs/version-7.0.0/api/toMercator.mdx +++ b/versioned_docs/version-7.0.0/api/toMercator.mdx @@ -4,8 +4,13 @@ title: toMercator import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection diff --git a/versioned_docs/version-7.0.0/api/toWgs84.mdx b/versioned_docs/version-7.0.0/api/toWgs84.mdx index 57b48b62..e1a677d0 100644 --- a/versioned_docs/version-7.0.0/api/toWgs84.mdx +++ b/versioned_docs/version-7.0.0/api/toWgs84.mdx @@ -4,8 +4,13 @@ title: toWgs84 import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection diff --git a/versioned_docs/version-7.0.0/api/transformRotate.mdx b/versioned_docs/version-7.0.0/api/transformRotate.mdx index 11e1457f..505d95fe 100644 --- a/versioned_docs/version-7.0.0/api/transformRotate.mdx +++ b/versioned_docs/version-7.0.0/api/transformRotate.mdx @@ -4,8 +4,13 @@ title: transformRotate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point. diff --git a/versioned_docs/version-7.0.0/api/transformScale.mdx b/versioned_docs/version-7.0.0/api/transformScale.mdx index 035132b9..f5bb1c48 100644 --- a/versioned_docs/version-7.0.0/api/transformScale.mdx +++ b/versioned_docs/version-7.0.0/api/transformScale.mdx @@ -4,8 +4,13 @@ title: transformScale import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger). diff --git a/versioned_docs/version-7.0.0/api/transformTranslate.mdx b/versioned_docs/version-7.0.0/api/transformTranslate.mdx index 397c1018..96031093 100644 --- a/versioned_docs/version-7.0.0/api/transformTranslate.mdx +++ b/versioned_docs/version-7.0.0/api/transformTranslate.mdx @@ -4,8 +4,13 @@ title: transformTranslate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line diff --git a/versioned_docs/version-7.0.0/api/triangleGrid.mdx b/versioned_docs/version-7.0.0/api/triangleGrid.mdx index ad93a530..601cd4a3 100644 --- a/versioned_docs/version-7.0.0/api/triangleGrid.mdx +++ b/versioned_docs/version-7.0.0/api/triangleGrid.mdx @@ -4,8 +4,13 @@ title: triangleGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and a cell depth and returns a set of triangular [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) in a grid. diff --git a/versioned_docs/version-7.0.0/api/truncate.mdx b/versioned_docs/version-7.0.0/api/truncate.mdx index 74c6bd66..4d908ce7 100644 --- a/versioned_docs/version-7.0.0/api/truncate.mdx +++ b/versioned_docs/version-7.0.0/api/truncate.mdx @@ -4,8 +4,13 @@ title: truncate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry. diff --git a/versioned_docs/version-7.0.0/api/union.mdx b/versioned_docs/version-7.0.0/api/union.mdx index 8418ffda..2b14c6aa 100644 --- a/versioned_docs/version-7.0.0/api/union.mdx +++ b/versioned_docs/version-7.0.0/api/union.mdx @@ -4,8 +4,13 @@ title: union import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6) and returns a combined polygon. If the input polygons are not contiguous, this function returns a [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature. diff --git a/versioned_docs/version-7.0.0/api/unkinkPolygon.mdx b/versioned_docs/version-7.0.0/api/unkinkPolygon.mdx index 3f966888..35dfd5b3 100644 --- a/versioned_docs/version-7.0.0/api/unkinkPolygon.mdx +++ b/versioned_docs/version-7.0.0/api/unkinkPolygon.mdx @@ -4,8 +4,13 @@ title: unkinkPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a kinked polygon and returns a feature collection of polygons that have no kinks. diff --git a/versioned_docs/version-7.0.0/api/variance.mdx b/versioned_docs/version-7.0.0/api/variance.mdx index f238c095..57d7186a 100644 --- a/versioned_docs/version-7.0.0/api/variance.mdx +++ b/versioned_docs/version-7.0.0/api/variance.mdx @@ -4,8 +4,13 @@ title: variance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get variance of a list diff --git a/versioned_docs/version-7.0.0/api/voronoi.mdx b/versioned_docs/version-7.0.0/api/voronoi.mdx index d117af59..6cfb63c2 100644 --- a/versioned_docs/version-7.0.0/api/voronoi.mdx +++ b/versioned_docs/version-7.0.0/api/voronoi.mdx @@ -4,8 +4,13 @@ title: voronoi import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a FeatureCollection of points, and a bounding box, and returns a FeatureCollection diff --git a/versioned_docs/version-7.1.0/api/along.mdx b/versioned_docs/version-7.1.0/api/along.mdx index ca59a778..fdbfd2b3 100644 --- a/versioned_docs/version-7.1.0/api/along.mdx +++ b/versioned_docs/version-7.1.0/api/along.mdx @@ -4,8 +4,13 @@ title: along import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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. diff --git a/versioned_docs/version-7.1.0/api/angle.mdx b/versioned_docs/version-7.1.0/api/angle.mdx index 8b144f23..64cfdacc 100644 --- a/versioned_docs/version-7.1.0/api/angle.mdx +++ b/versioned_docs/version-7.1.0/api/angle.mdx @@ -4,8 +4,13 @@ title: angle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; 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) diff --git a/versioned_docs/version-7.1.0/api/area.mdx b/versioned_docs/version-7.1.0/api/area.mdx index ece1f215..1222c057 100644 --- a/versioned_docs/version-7.1.0/api/area.mdx +++ b/versioned_docs/version-7.1.0/api/area.mdx @@ -4,8 +4,13 @@ title: area import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the geodesic area in square meters of one or more polygons. diff --git a/versioned_docs/version-7.1.0/api/azimuthToBearing.mdx b/versioned_docs/version-7.1.0/api/azimuthToBearing.mdx index cfcf0561..73670902 100644 --- a/versioned_docs/version-7.1.0/api/azimuthToBearing.mdx +++ b/versioned_docs/version-7.1.0/api/azimuthToBearing.mdx @@ -4,8 +4,13 @@ title: azimuthToBearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts any azimuth angle from the north line direction (positive clockwise) diff --git a/versioned_docs/version-7.1.0/api/bbox.mdx b/versioned_docs/version-7.1.0/api/bbox.mdx index 246249e5..1a5fe4e9 100644 --- a/versioned_docs/version-7.1.0/api/bbox.mdx +++ b/versioned_docs/version-7.1.0/api/bbox.mdx @@ -4,8 +4,13 @@ title: bbox import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the bounding box for any GeoJSON object, including FeatureCollection. diff --git a/versioned_docs/version-7.1.0/api/bboxClip.mdx b/versioned_docs/version-7.1.0/api/bboxClip.mdx index 5124021f..df9328b0 100644 --- a/versioned_docs/version-7.1.0/api/bboxClip.mdx +++ b/versioned_docs/version-7.1.0/api/bboxClip.mdx @@ -4,8 +4,13 @@ title: bboxClip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) and a bbox and clips the feature to the bbox using diff --git a/versioned_docs/version-7.1.0/api/bboxPolygon.mdx b/versioned_docs/version-7.1.0/api/bboxPolygon.mdx index 119619c0..128f29c4 100644 --- a/versioned_docs/version-7.1.0/api/bboxPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/bboxPolygon.mdx @@ -4,8 +4,13 @@ title: bboxPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bbox and returns an equivalent [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.1.0/api/bearing.mdx b/versioned_docs/version-7.1.0/api/bearing.mdx index 91af3bf3..b8a682b0 100644 --- a/versioned_docs/version-7.1.0/api/bearing.mdx +++ b/versioned_docs/version-7.1.0/api/bearing.mdx @@ -4,8 +4,13 @@ title: bearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the geographic bearing between them, diff --git a/versioned_docs/version-7.1.0/api/bearingToAzimuth.mdx b/versioned_docs/version-7.1.0/api/bearingToAzimuth.mdx index 7f61defa..dd06c647 100644 --- a/versioned_docs/version-7.1.0/api/bearingToAzimuth.mdx +++ b/versioned_docs/version-7.1.0/api/bearingToAzimuth.mdx @@ -4,8 +4,13 @@ title: bearingToAzimuth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts any bearing angle from the north line direction (positive clockwise) diff --git a/versioned_docs/version-7.1.0/api/bezierSpline.mdx b/versioned_docs/version-7.1.0/api/bezierSpline.mdx index 3062a93c..b0b0d1b4 100644 --- a/versioned_docs/version-7.1.0/api/bezierSpline.mdx +++ b/versioned_docs/version-7.1.0/api/bezierSpline.mdx @@ -4,8 +4,13 @@ title: bezierSpline import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a curved version diff --git a/versioned_docs/version-7.1.0/api/booleanClockwise.mdx b/versioned_docs/version-7.1.0/api/booleanClockwise.mdx index 923ea0a0..77a0c0e4 100644 --- a/versioned_docs/version-7.1.0/api/booleanClockwise.mdx +++ b/versioned_docs/version-7.1.0/api/booleanClockwise.mdx @@ -4,8 +4,13 @@ title: booleanClockwise import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise. diff --git a/versioned_docs/version-7.1.0/api/booleanConcave.mdx b/versioned_docs/version-7.1.0/api/booleanConcave.mdx index 1b100dba..213e1369 100644 --- a/versioned_docs/version-7.1.0/api/booleanConcave.mdx +++ b/versioned_docs/version-7.1.0/api/booleanConcave.mdx @@ -4,8 +4,13 @@ title: booleanConcave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a polygon and return true or false as to whether it is concave or not. diff --git a/versioned_docs/version-7.1.0/api/booleanContains.mdx b/versioned_docs/version-7.1.0/api/booleanContains.mdx index 55249a0f..1240afe6 100644 --- a/versioned_docs/version-7.1.0/api/booleanContains.mdx +++ b/versioned_docs/version-7.1.0/api/booleanContains.mdx @@ -4,8 +4,13 @@ title: booleanContains import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-contains returns True if the second geometry is completely contained by the first geometry. diff --git a/versioned_docs/version-7.1.0/api/booleanCrosses.mdx b/versioned_docs/version-7.1.0/api/booleanCrosses.mdx index ee763d0e..85ba7969 100644 --- a/versioned_docs/version-7.1.0/api/booleanCrosses.mdx +++ b/versioned_docs/version-7.1.0/api/booleanCrosses.mdx @@ -4,8 +4,13 @@ title: booleanCrosses import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than diff --git a/versioned_docs/version-7.1.0/api/booleanDisjoint.mdx b/versioned_docs/version-7.1.0/api/booleanDisjoint.mdx index 5a054c2c..4db87f71 100644 --- a/versioned_docs/version-7.1.0/api/booleanDisjoint.mdx +++ b/versioned_docs/version-7.1.0/api/booleanDisjoint.mdx @@ -4,8 +4,13 @@ title: booleanDisjoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set. diff --git a/versioned_docs/version-7.1.0/api/booleanEqual.mdx b/versioned_docs/version-7.1.0/api/booleanEqual.mdx index ef285924..d92861ad 100644 --- a/versioned_docs/version-7.1.0/api/booleanEqual.mdx +++ b/versioned_docs/version-7.1.0/api/booleanEqual.mdx @@ -4,8 +4,13 @@ title: booleanEqual import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Determine whether two geometries of the same type have identical X,Y coordinate values. diff --git a/versioned_docs/version-7.1.0/api/booleanIntersects.mdx b/versioned_docs/version-7.1.0/api/booleanIntersects.mdx index 18d4579e..d8700ce6 100644 --- a/versioned_docs/version-7.1.0/api/booleanIntersects.mdx +++ b/versioned_docs/version-7.1.0/api/booleanIntersects.mdx @@ -4,8 +4,13 @@ title: booleanIntersects import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-intersects returns (TRUE) if the intersection of the two geometries is NOT an empty set. diff --git a/versioned_docs/version-7.1.0/api/booleanOverlap.mdx b/versioned_docs/version-7.1.0/api/booleanOverlap.mdx index b4ffe434..cbc7c8e9 100644 --- a/versioned_docs/version-7.1.0/api/booleanOverlap.mdx +++ b/versioned_docs/version-7.1.0/api/booleanOverlap.mdx @@ -4,8 +4,13 @@ title: booleanOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Compares two geometries of the same dimension and returns true if their intersection set results in a geometry diff --git a/versioned_docs/version-7.1.0/api/booleanParallel.mdx b/versioned_docs/version-7.1.0/api/booleanParallel.mdx index a30cf984..e4a7fe75 100644 --- a/versioned_docs/version-7.1.0/api/booleanParallel.mdx +++ b/versioned_docs/version-7.1.0/api/booleanParallel.mdx @@ -4,8 +4,13 @@ title: booleanParallel import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2` diff --git a/versioned_docs/version-7.1.0/api/booleanPointInPolygon.mdx b/versioned_docs/version-7.1.0/api/booleanPointInPolygon.mdx index 48c8c8d2..a172066c 100644 --- a/versioned_docs/version-7.1.0/api/booleanPointInPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/booleanPointInPolygon.mdx @@ -4,8 +4,13 @@ title: booleanPointInPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) and determines if the point diff --git a/versioned_docs/version-7.1.0/api/booleanPointOnLine.mdx b/versioned_docs/version-7.1.0/api/booleanPointOnLine.mdx index dcfdbfa1..a82d07ca 100644 --- a/versioned_docs/version-7.1.0/api/booleanPointOnLine.mdx +++ b/versioned_docs/version-7.1.0/api/booleanPointOnLine.mdx @@ -4,8 +4,13 @@ title: booleanPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns true if a point is on a line. Accepts a optional parameter to ignore the diff --git a/versioned_docs/version-7.1.0/api/booleanTouches.mdx b/versioned_docs/version-7.1.0/api/booleanTouches.mdx index 59ccdf23..492c88ce 100644 --- a/versioned_docs/version-7.1.0/api/booleanTouches.mdx +++ b/versioned_docs/version-7.1.0/api/booleanTouches.mdx @@ -4,8 +4,13 @@ title: booleanTouches import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-touches true if none of the points common to both geometries diff --git a/versioned_docs/version-7.1.0/api/booleanValid.mdx b/versioned_docs/version-7.1.0/api/booleanValid.mdx index 1305686f..9cbff231 100644 --- a/versioned_docs/version-7.1.0/api/booleanValid.mdx +++ b/versioned_docs/version-7.1.0/api/booleanValid.mdx @@ -4,8 +4,13 @@ title: booleanValid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description booleanValid checks if the geometry is a valid according to the OGC Simple Feature Specification. diff --git a/versioned_docs/version-7.1.0/api/booleanWithin.mdx b/versioned_docs/version-7.1.0/api/booleanWithin.mdx index 552dca46..105bc2f1 100644 --- a/versioned_docs/version-7.1.0/api/booleanWithin.mdx +++ b/versioned_docs/version-7.1.0/api/booleanWithin.mdx @@ -4,8 +4,13 @@ title: booleanWithin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Boolean-within returns true if the first geometry is completely within the second geometry. diff --git a/versioned_docs/version-7.1.0/api/buffer.mdx b/versioned_docs/version-7.1.0/api/buffer.mdx index 1569c00e..9af99141 100644 --- a/versioned_docs/version-7.1.0/api/buffer.mdx +++ b/versioned_docs/version-7.1.0/api/buffer.mdx @@ -4,8 +4,13 @@ title: buffer import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. diff --git a/versioned_docs/version-7.1.0/api/center.mdx b/versioned_docs/version-7.1.0/api/center.mdx index a20269f6..4f5f248f 100644 --- a/versioned_docs/version-7.1.0/api/center.mdx +++ b/versioned_docs/version-7.1.0/api/center.mdx @@ -4,8 +4,13 @@ title: center import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the absolute center point of all features. diff --git a/versioned_docs/version-7.1.0/api/centerMean.mdx b/versioned_docs/version-7.1.0/api/centerMean.mdx index a8816f0d..ff7d518c 100644 --- a/versioned_docs/version-7.1.0/api/centerMean.mdx +++ b/versioned_docs/version-7.1.0/api/centerMean.mdx @@ -4,8 +4,13 @@ title: centerMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns the mean center. Can be weighted. diff --git a/versioned_docs/version-7.1.0/api/centerMedian.mdx b/versioned_docs/version-7.1.0/api/centerMedian.mdx index b53ac1a0..0fc7cf19 100644 --- a/versioned_docs/version-7.1.0/api/centerMedian.mdx +++ b/versioned_docs/version-7.1.0/api/centerMedian.mdx @@ -4,8 +4,13 @@ title: centerMedian import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of points and calculates the median center, diff --git a/versioned_docs/version-7.1.0/api/centerOfMass.mdx b/versioned_docs/version-7.1.0/api/centerOfMass.mdx index 36be1089..b6aa168d 100644 --- a/versioned_docs/version-7.1.0/api/centerOfMass.mdx +++ b/versioned_docs/version-7.1.0/api/centerOfMass.mdx @@ -4,8 +4,13 @@ title: centerOfMass import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns its [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) using this formula: [Centroid of Polygon](https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon). diff --git a/versioned_docs/version-7.1.0/api/centroid.mdx b/versioned_docs/version-7.1.0/api/centroid.mdx index 637b92d3..97b6ded0 100644 --- a/versioned_docs/version-7.1.0/api/centroid.mdx +++ b/versioned_docs/version-7.1.0/api/centroid.mdx @@ -4,8 +4,13 @@ title: centroid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Computes the centroid as the mean of all vertices within the object. diff --git a/versioned_docs/version-7.1.0/api/circle.mdx b/versioned_docs/version-7.1.0/api/circle.mdx index 42f3e213..67a2d0c7 100644 --- a/versioned_docs/version-7.1.0/api/circle.mdx +++ b/versioned_docs/version-7.1.0/api/circle.mdx @@ -4,8 +4,13 @@ title: circle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision. diff --git a/versioned_docs/version-7.1.0/api/cleanCoords.mdx b/versioned_docs/version-7.1.0/api/cleanCoords.mdx index 57062d5b..57766b23 100644 --- a/versioned_docs/version-7.1.0/api/cleanCoords.mdx +++ b/versioned_docs/version-7.1.0/api/cleanCoords.mdx @@ -4,8 +4,13 @@ title: cleanCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Removes redundant coordinates from any GeoJSON Geometry. diff --git a/versioned_docs/version-7.1.0/api/clone.mdx b/versioned_docs/version-7.1.0/api/clone.mdx index 34e86b9b..0c88ae96 100644 --- a/versioned_docs/version-7.1.0/api/clone.mdx +++ b/versioned_docs/version-7.1.0/api/clone.mdx @@ -4,8 +4,13 @@ title: clone import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'. diff --git a/versioned_docs/version-7.1.0/api/clusterEach.mdx b/versioned_docs/version-7.1.0/api/clusterEach.mdx index 711af2ed..98db9cbb 100644 --- a/versioned_docs/version-7.1.0/api/clusterEach.mdx +++ b/versioned_docs/version-7.1.0/api/clusterEach.mdx @@ -4,8 +4,13 @@ title: clusterEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description clusterEach diff --git a/versioned_docs/version-7.1.0/api/clusterReduce.mdx b/versioned_docs/version-7.1.0/api/clusterReduce.mdx index fb8192ec..916ce6e2 100644 --- a/versioned_docs/version-7.1.0/api/clusterReduce.mdx +++ b/versioned_docs/version-7.1.0/api/clusterReduce.mdx @@ -4,8 +4,13 @@ title: clusterReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce clusters in GeoJSON Features, similar to Array.reduce() diff --git a/versioned_docs/version-7.1.0/api/clustersDbscan.mdx b/versioned_docs/version-7.1.0/api/clustersDbscan.mdx index 2fd9da20..3dd9ecae 100644 --- a/versioned_docs/version-7.1.0/api/clustersDbscan.mdx +++ b/versioned_docs/version-7.1.0/api/clustersDbscan.mdx @@ -4,8 +4,13 @@ title: clustersDbscan import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters according to [DBSCAN's](https://en.wikipedia.org/wiki/DBSCAN) data clustering algorithm. diff --git a/versioned_docs/version-7.1.0/api/clustersKmeans.mdx b/versioned_docs/version-7.1.0/api/clustersKmeans.mdx index 963f9e2a..f595eb49 100644 --- a/versioned_docs/version-7.1.0/api/clustersKmeans.mdx +++ b/versioned_docs/version-7.1.0/api/clustersKmeans.mdx @@ -4,8 +4,13 @@ title: clustersKmeans import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and partition them into clusters using the k-mean . diff --git a/versioned_docs/version-7.1.0/api/collect.mdx b/versioned_docs/version-7.1.0/api/collect.mdx index 3953dbd2..dd6e11a3 100644 --- a/versioned_docs/version-7.1.0/api/collect.mdx +++ b/versioned_docs/version-7.1.0/api/collect.mdx @@ -4,8 +4,13 @@ title: collect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Merges a specified property from a FeatureCollection of points into a diff --git a/versioned_docs/version-7.1.0/api/collectionOf.mdx b/versioned_docs/version-7.1.0/api/collectionOf.mdx index b4049c69..c276c9a0 100644 --- a/versioned_docs/version-7.1.0/api/collectionOf.mdx +++ b/versioned_docs/version-7.1.0/api/collectionOf.mdx @@ -4,8 +4,13 @@ title: collectionOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inputs for Turf. diff --git a/versioned_docs/version-7.1.0/api/combine.mdx b/versioned_docs/version-7.1.0/api/combine.mdx index ac2c8e72..bc5d33aa 100644 --- a/versioned_docs/version-7.1.0/api/combine.mdx +++ b/versioned_docs/version-7.1.0/api/combine.mdx @@ -4,8 +4,13 @@ title: combine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Combines a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), or [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) features diff --git a/versioned_docs/version-7.1.0/api/concave.mdx b/versioned_docs/version-7.1.0/api/concave.mdx index 51cb1a71..d02b9e02 100644 --- a/versioned_docs/version-7.1.0/api/concave.mdx +++ b/versioned_docs/version-7.1.0/api/concave.mdx @@ -4,8 +4,13 @@ title: concave import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and returns a concave hull Polygon or MultiPolygon. diff --git a/versioned_docs/version-7.1.0/api/containsNumber.mdx b/versioned_docs/version-7.1.0/api/containsNumber.mdx index 96efae80..25602f8d 100644 --- a/versioned_docs/version-7.1.0/api/containsNumber.mdx +++ b/versioned_docs/version-7.1.0/api/containsNumber.mdx @@ -4,8 +4,13 @@ title: containsNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Checks if coordinates contains a number diff --git a/versioned_docs/version-7.1.0/api/convertArea.mdx b/versioned_docs/version-7.1.0/api/convertArea.mdx index d4417d7e..6c52a5e6 100644 --- a/versioned_docs/version-7.1.0/api/convertArea.mdx +++ b/versioned_docs/version-7.1.0/api/convertArea.mdx @@ -4,8 +4,13 @@ title: convertArea import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a area to the requested unit. diff --git a/versioned_docs/version-7.1.0/api/convertLength.mdx b/versioned_docs/version-7.1.0/api/convertLength.mdx index bbe82674..53823f70 100644 --- a/versioned_docs/version-7.1.0/api/convertLength.mdx +++ b/versioned_docs/version-7.1.0/api/convertLength.mdx @@ -4,8 +4,13 @@ title: convertLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a length to the requested unit. diff --git a/versioned_docs/version-7.1.0/api/convex.mdx b/versioned_docs/version-7.1.0/api/convex.mdx index f83b0785..24cf96e5 100644 --- a/versioned_docs/version-7.1.0/api/convex.mdx +++ b/versioned_docs/version-7.1.0/api/convex.mdx @@ -4,8 +4,13 @@ title: convex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a convex hull [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.1.0/api/coordAll.mdx b/versioned_docs/version-7.1.0/api/coordAll.mdx index 0751ff73..55ea2b9d 100644 --- a/versioned_docs/version-7.1.0/api/coordAll.mdx +++ b/versioned_docs/version-7.1.0/api/coordAll.mdx @@ -4,8 +4,13 @@ title: coordAll import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get all coordinates from any GeoJSON object. diff --git a/versioned_docs/version-7.1.0/api/coordEach.mdx b/versioned_docs/version-7.1.0/api/coordEach.mdx index 0e5c1fe5..ddc6a3d6 100644 --- a/versioned_docs/version-7.1.0/api/coordEach.mdx +++ b/versioned_docs/version-7.1.0/api/coordEach.mdx @@ -4,8 +4,13 @@ title: coordEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over coordinates in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.1.0/api/coordReduce.mdx b/versioned_docs/version-7.1.0/api/coordReduce.mdx index b59d720e..df50ca38 100644 --- a/versioned_docs/version-7.1.0/api/coordReduce.mdx +++ b/versioned_docs/version-7.1.0/api/coordReduce.mdx @@ -4,8 +4,13 @@ title: coordReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce coordinates in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-7.1.0/api/degreesToRadians.mdx b/versioned_docs/version-7.1.0/api/degreesToRadians.mdx index 76debaaa..b04b2eb0 100644 --- a/versioned_docs/version-7.1.0/api/degreesToRadians.mdx +++ b/versioned_docs/version-7.1.0/api/degreesToRadians.mdx @@ -4,8 +4,13 @@ title: degreesToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in degrees to radians diff --git a/versioned_docs/version-7.1.0/api/destination.mdx b/versioned_docs/version-7.1.0/api/destination.mdx index 6a5b03a8..e8ab6d48 100644 --- a/versioned_docs/version-7.1.0/api/destination.mdx +++ b/versioned_docs/version-7.1.0/api/destination.mdx @@ -4,8 +4,13 @@ title: destination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the location of a destination point given a distance in diff --git a/versioned_docs/version-7.1.0/api/difference.mdx b/versioned_docs/version-7.1.0/api/difference.mdx index a073e852..228352e9 100644 --- a/versioned_docs/version-7.1.0/api/difference.mdx +++ b/versioned_docs/version-7.1.0/api/difference.mdx @@ -4,8 +4,13 @@ title: difference import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the difference between multiple [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) by clipping the subsequent polygon from the first. diff --git a/versioned_docs/version-7.1.0/api/directionalMean.mdx b/versioned_docs/version-7.1.0/api/directionalMean.mdx index 21092328..b21a5888 100644 --- a/versioned_docs/version-7.1.0/api/directionalMean.mdx +++ b/versioned_docs/version-7.1.0/api/directionalMean.mdx @@ -4,8 +4,13 @@ title: directionalMean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description This module calculate the average angle of a set of lines, measuring the trend of it. diff --git a/versioned_docs/version-7.1.0/api/dissolve.mdx b/versioned_docs/version-7.1.0/api/dissolve.mdx index 7c1be641..869f8895 100644 --- a/versioned_docs/version-7.1.0/api/dissolve.mdx +++ b/versioned_docs/version-7.1.0/api/dissolve.mdx @@ -4,8 +4,13 @@ title: dissolve import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Dissolves a FeatureCollection of [polygon](polygon) features, filtered by an optional property name:value. diff --git a/versioned_docs/version-7.1.0/api/distance.mdx b/versioned_docs/version-7.1.0/api/distance.mdx index 8a00c676..1e463a01 100644 --- a/versioned_docs/version-7.1.0/api/distance.mdx +++ b/versioned_docs/version-7.1.0/api/distance.mdx @@ -4,8 +4,13 @@ title: distance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance between two [coordinates](https://tools.ietf.org/html/rfc7946#section-3.1.1) in degrees, radians, miles, or kilometers. diff --git a/versioned_docs/version-7.1.0/api/distanceWeight.mdx b/versioned_docs/version-7.1.0/api/distanceWeight.mdx index 1764cfd3..59675b2d 100644 --- a/versioned_docs/version-7.1.0/api/distanceWeight.mdx +++ b/versioned_docs/version-7.1.0/api/distanceWeight.mdx @@ -4,8 +4,13 @@ title: distanceWeight import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description ### Parameters diff --git a/versioned_docs/version-7.1.0/api/ellipse.mdx b/versioned_docs/version-7.1.0/api/ellipse.mdx index 9f47e136..94ea1895 100644 --- a/versioned_docs/version-7.1.0/api/ellipse.mdx +++ b/versioned_docs/version-7.1.0/api/ellipse.mdx @@ -4,8 +4,13 @@ title: ellipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision. diff --git a/versioned_docs/version-7.1.0/api/envelope.mdx b/versioned_docs/version-7.1.0/api/envelope.mdx index 38946c08..b65dd459 100644 --- a/versioned_docs/version-7.1.0/api/envelope.mdx +++ b/versioned_docs/version-7.1.0/api/envelope.mdx @@ -4,8 +4,13 @@ title: envelope import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any number of features and returns a rectangular [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) that encompasses all vertices. diff --git a/versioned_docs/version-7.1.0/api/explode.mdx b/versioned_docs/version-7.1.0/api/explode.mdx index d561d368..3dcdcaeb 100644 --- a/versioned_docs/version-7.1.0/api/explode.mdx +++ b/versioned_docs/version-7.1.0/api/explode.mdx @@ -4,8 +4,13 @@ title: explode import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a feature or set of features and returns all positions as [points](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-7.1.0/api/feature.mdx b/versioned_docs/version-7.1.0/api/feature.mdx index 9e5e29d3..740b3de5 100644 --- a/versioned_docs/version-7.1.0/api/feature.mdx +++ b/versioned_docs/version-7.1.0/api/feature.mdx @@ -4,8 +4,13 @@ title: feature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Wraps a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) in a GeoJSON [Feature](https://tools.ietf.org/html/rfc7946#section-3.2). diff --git a/versioned_docs/version-7.1.0/api/featureCollection.mdx b/versioned_docs/version-7.1.0/api/featureCollection.mdx index 88aa5cd9..ca6e9c18 100644 --- a/versioned_docs/version-7.1.0/api/featureCollection.mdx +++ b/versioned_docs/version-7.1.0/api/featureCollection.mdx @@ -4,8 +4,13 @@ title: featureCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes one or more [Features](https://tools.ietf.org/html/rfc7946#section-3.2) and creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3). diff --git a/versioned_docs/version-7.1.0/api/featureEach.mdx b/versioned_docs/version-7.1.0/api/featureEach.mdx index f5dcd8a8..f22704a3 100644 --- a/versioned_docs/version-7.1.0/api/featureEach.mdx +++ b/versioned_docs/version-7.1.0/api/featureEach.mdx @@ -4,8 +4,13 @@ title: featureEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over features in any GeoJSON object, similar to diff --git a/versioned_docs/version-7.1.0/api/featureOf.mdx b/versioned_docs/version-7.1.0/api/featureOf.mdx index c4bbf3d9..56dfae98 100644 --- a/versioned_docs/version-7.1.0/api/featureOf.mdx +++ b/versioned_docs/version-7.1.0/api/featureOf.mdx @@ -4,8 +4,13 @@ title: featureOf import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) inputs for Turf. diff --git a/versioned_docs/version-7.1.0/api/featureReduce.mdx b/versioned_docs/version-7.1.0/api/featureReduce.mdx index 8280888d..0b16b874 100644 --- a/versioned_docs/version-7.1.0/api/featureReduce.mdx +++ b/versioned_docs/version-7.1.0/api/featureReduce.mdx @@ -4,8 +4,13 @@ title: featureReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.1.0/api/findPoint.mdx b/versioned_docs/version-7.1.0/api/findPoint.mdx index 79afbf8b..7a2bb740 100644 --- a/versioned_docs/version-7.1.0/api/findPoint.mdx +++ b/versioned_docs/version-7.1.0/api/findPoint.mdx @@ -4,8 +4,13 @@ title: findPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular Point from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-7.1.0/api/findSegment.mdx b/versioned_docs/version-7.1.0/api/findSegment.mdx index 30ef8dfb..27a7cf36 100644 --- a/versioned_docs/version-7.1.0/api/findSegment.mdx +++ b/versioned_docs/version-7.1.0/api/findSegment.mdx @@ -4,8 +4,13 @@ title: findSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes. diff --git a/versioned_docs/version-7.1.0/api/flatten.mdx b/versioned_docs/version-7.1.0/api/flatten.mdx index b65a6600..a1bf4cc3 100644 --- a/versioned_docs/version-7.1.0/api/flatten.mdx +++ b/versioned_docs/version-7.1.0/api/flatten.mdx @@ -4,8 +4,13 @@ title: flatten import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Flattens any [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) to a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten). diff --git a/versioned_docs/version-7.1.0/api/flattenEach.mdx b/versioned_docs/version-7.1.0/api/flattenEach.mdx index 1a2bb5a4..9a13fb28 100644 --- a/versioned_docs/version-7.1.0/api/flattenEach.mdx +++ b/versioned_docs/version-7.1.0/api/flattenEach.mdx @@ -4,8 +4,13 @@ title: flattenEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over flattened features in any GeoJSON object, similar to diff --git a/versioned_docs/version-7.1.0/api/flattenReduce.mdx b/versioned_docs/version-7.1.0/api/flattenReduce.mdx index 4f1d80dd..9868e073 100644 --- a/versioned_docs/version-7.1.0/api/flattenReduce.mdx +++ b/versioned_docs/version-7.1.0/api/flattenReduce.mdx @@ -4,8 +4,13 @@ title: flattenReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce flattened features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.1.0/api/flip.mdx b/versioned_docs/version-7.1.0/api/flip.mdx index 8dfb19dc..c90a8713 100644 --- a/versioned_docs/version-7.1.0/api/flip.mdx +++ b/versioned_docs/version-7.1.0/api/flip.mdx @@ -4,8 +4,13 @@ title: flip import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input features and flips all of their coordinates from `[x, y]` to `[y, x]`. diff --git a/versioned_docs/version-7.1.0/api/geojsonType.mdx b/versioned_docs/version-7.1.0/api/geojsonType.mdx index d342fa07..7744cb6e 100644 --- a/versioned_docs/version-7.1.0/api/geojsonType.mdx +++ b/versioned_docs/version-7.1.0/api/geojsonType.mdx @@ -4,8 +4,13 @@ title: geojsonType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Enforce expectations about types of GeoJSON objects for Turf. diff --git a/versioned_docs/version-7.1.0/api/geomEach.mdx b/versioned_docs/version-7.1.0/api/geomEach.mdx index 9a073c2d..f916d6d1 100644 --- a/versioned_docs/version-7.1.0/api/geomEach.mdx +++ b/versioned_docs/version-7.1.0/api/geomEach.mdx @@ -4,8 +4,13 @@ title: geomEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over each geometry in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.1.0/api/geomReduce.mdx b/versioned_docs/version-7.1.0/api/geomReduce.mdx index 101034a8..f5b86a84 100644 --- a/versioned_docs/version-7.1.0/api/geomReduce.mdx +++ b/versioned_docs/version-7.1.0/api/geomReduce.mdx @@ -4,8 +4,13 @@ title: geomReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce geometry in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.1.0/api/geometry.mdx b/versioned_docs/version-7.1.0/api/geometry.mdx index cafae02a..c045d4b0 100644 --- a/versioned_docs/version-7.1.0/api/geometry.mdx +++ b/versioned_docs/version-7.1.0/api/geometry.mdx @@ -4,8 +4,13 @@ title: geometry import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a GeoJSON [Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) from a Geometry string type & coordinates. diff --git a/versioned_docs/version-7.1.0/api/geometryCollection.mdx b/versioned_docs/version-7.1.0/api/geometryCollection.mdx index 9adfcf6b..ea30107d 100644 --- a/versioned_docs/version-7.1.0/api/geometryCollection.mdx +++ b/versioned_docs/version-7.1.0/api/geometryCollection.mdx @@ -4,8 +4,13 @@ title: geometryCollection import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[GeometryCollection](https://tools.ietf.org/html/rfc7946#section-3.1.8)\> based on a diff --git a/versioned_docs/version-7.1.0/api/getCluster.mdx b/versioned_docs/version-7.1.0/api/getCluster.mdx index deef155c..61cb258c 100644 --- a/versioned_docs/version-7.1.0/api/getCluster.mdx +++ b/versioned_docs/version-7.1.0/api/getCluster.mdx @@ -4,8 +4,13 @@ title: getCluster import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Cluster diff --git a/versioned_docs/version-7.1.0/api/getCoord.mdx b/versioned_docs/version-7.1.0/api/getCoord.mdx index 07a41450..52b32587 100644 --- a/versioned_docs/version-7.1.0/api/getCoord.mdx +++ b/versioned_docs/version-7.1.0/api/getCoord.mdx @@ -4,8 +4,13 @@ title: getCoord import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap a coordinate from a Point Feature, Geometry or a single coordinate. diff --git a/versioned_docs/version-7.1.0/api/getCoords.mdx b/versioned_docs/version-7.1.0/api/getCoords.mdx index 6c6bf396..9d79e434 100644 --- a/versioned_docs/version-7.1.0/api/getCoords.mdx +++ b/versioned_docs/version-7.1.0/api/getCoords.mdx @@ -4,8 +4,13 @@ title: getCoords import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Unwrap coordinates from a Feature, Geometry Object or an Array diff --git a/versioned_docs/version-7.1.0/api/getGeom.mdx b/versioned_docs/version-7.1.0/api/getGeom.mdx index c17f8e1d..7a9a80b9 100644 --- a/versioned_docs/version-7.1.0/api/getGeom.mdx +++ b/versioned_docs/version-7.1.0/api/getGeom.mdx @@ -4,8 +4,13 @@ title: getGeom import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get Geometry from Feature or Geometry Object diff --git a/versioned_docs/version-7.1.0/api/getType.mdx b/versioned_docs/version-7.1.0/api/getType.mdx index 1efae6ae..73b15ec9 100644 --- a/versioned_docs/version-7.1.0/api/getType.mdx +++ b/versioned_docs/version-7.1.0/api/getType.mdx @@ -4,8 +4,13 @@ title: getType import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Get GeoJSON object's type, Geometry type is prioritize. diff --git a/versioned_docs/version-7.1.0/api/greatCircle.mdx b/versioned_docs/version-7.1.0/api/greatCircle.mdx index d5405bb8..62a27ef7 100644 --- a/versioned_docs/version-7.1.0/api/greatCircle.mdx +++ b/versioned_docs/version-7.1.0/api/greatCircle.mdx @@ -4,8 +4,13 @@ title: greatCircle import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculate great circles routes as [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5). diff --git a/versioned_docs/version-7.1.0/api/hexGrid.mdx b/versioned_docs/version-7.1.0/api/hexGrid.mdx index 7e678d9e..f779d1d5 100644 --- a/versioned_docs/version-7.1.0/api/hexGrid.mdx +++ b/versioned_docs/version-7.1.0/api/hexGrid.mdx @@ -4,8 +4,13 @@ title: hexGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and the diameter of the cell and returns a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of flat-topped diff --git a/versioned_docs/version-7.1.0/api/interpolate.mdx b/versioned_docs/version-7.1.0/api/interpolate.mdx index 04694454..2a72dd19 100644 --- a/versioned_docs/version-7.1.0/api/interpolate.mdx +++ b/versioned_docs/version-7.1.0/api/interpolate.mdx @@ -4,8 +4,13 @@ title: interpolate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting). diff --git a/versioned_docs/version-7.1.0/api/intersect.mdx b/versioned_docs/version-7.1.0/api/intersect.mdx index 292c7ce1..a4e215a8 100644 --- a/versioned_docs/version-7.1.0/api/intersect.mdx +++ b/versioned_docs/version-7.1.0/api/intersect.mdx @@ -4,8 +4,13 @@ title: intersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes [polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [multi-polygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) geometries and diff --git a/versioned_docs/version-7.1.0/api/isNumber.mdx b/versioned_docs/version-7.1.0/api/isNumber.mdx index 95bb4d13..66d178a4 100644 --- a/versioned_docs/version-7.1.0/api/isNumber.mdx +++ b/versioned_docs/version-7.1.0/api/isNumber.mdx @@ -4,8 +4,13 @@ title: isNumber import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isNumber diff --git a/versioned_docs/version-7.1.0/api/isObject.mdx b/versioned_docs/version-7.1.0/api/isObject.mdx index 5b98f8ed..3c6e1036 100644 --- a/versioned_docs/version-7.1.0/api/isObject.mdx +++ b/versioned_docs/version-7.1.0/api/isObject.mdx @@ -4,8 +4,13 @@ title: isObject import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description isObject diff --git a/versioned_docs/version-7.1.0/api/isobands.mdx b/versioned_docs/version-7.1.0/api/isobands.mdx index 2d66b510..e17ca0bd 100644 --- a/versioned_docs/version-7.1.0/api/isobands.mdx +++ b/versioned_docs/version-7.1.0/api/isobands.mdx @@ -4,8 +4,13 @@ title: isobands import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a square or rectangular grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-7.1.0/api/isolines.mdx b/versioned_docs/version-7.1.0/api/isolines.mdx index edfd771b..e3ccb536 100644 --- a/versioned_docs/version-7.1.0/api/isolines.mdx +++ b/versioned_docs/version-7.1.0/api/isolines.mdx @@ -4,8 +4,13 @@ title: isolines import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a grid [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) features with z-values and an array of diff --git a/versioned_docs/version-7.1.0/api/kinks.mdx b/versioned_docs/version-7.1.0/api/kinks.mdx index c9f4bfe7..0c561323 100644 --- a/versioned_docs/version-7.1.0/api/kinks.mdx +++ b/versioned_docs/version-7.1.0/api/kinks.mdx @@ -4,8 +4,13 @@ title: kinks import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [linestring](https://tools.ietf.org/html/rfc7946#section-3.1.4), [multi-linestring](https://tools.ietf.org/html/rfc7946#section-3.1.5), diff --git a/versioned_docs/version-7.1.0/api/length.mdx b/versioned_docs/version-7.1.0/api/length.mdx index d99b4342..fe2fcf58 100644 --- a/versioned_docs/version-7.1.0/api/length.mdx +++ b/versioned_docs/version-7.1.0/api/length.mdx @@ -4,8 +4,13 @@ title: length import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) and measures its length in the specified units, [(Multi)Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)'s distance are ignored. diff --git a/versioned_docs/version-7.1.0/api/lengthToDegrees.mdx b/versioned_docs/version-7.1.0/api/lengthToDegrees.mdx index d088c5c4..978c5624 100644 --- a/versioned_docs/version-7.1.0/api/lengthToDegrees.mdx +++ b/versioned_docs/version-7.1.0/api/lengthToDegrees.mdx @@ -4,8 +4,13 @@ title: lengthToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees diff --git a/versioned_docs/version-7.1.0/api/lengthToRadians.mdx b/versioned_docs/version-7.1.0/api/lengthToRadians.mdx index f0292908..6bc34762 100644 --- a/versioned_docs/version-7.1.0/api/lengthToRadians.mdx +++ b/versioned_docs/version-7.1.0/api/lengthToRadians.mdx @@ -4,8 +4,13 @@ title: lengthToRadians import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians diff --git a/versioned_docs/version-7.1.0/api/lineArc.mdx b/versioned_docs/version-7.1.0/api/lineArc.mdx index eb08ff69..b4c499f4 100644 --- a/versioned_docs/version-7.1.0/api/lineArc.mdx +++ b/versioned_docs/version-7.1.0/api/lineArc.mdx @@ -4,8 +4,13 @@ title: lineArc import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; diff --git a/versioned_docs/version-7.1.0/api/lineChunk.mdx b/versioned_docs/version-7.1.0/api/lineChunk.mdx index a6c22dfc..91cca41e 100644 --- a/versioned_docs/version-7.1.0/api/lineChunk.mdx +++ b/versioned_docs/version-7.1.0/api/lineChunk.mdx @@ -4,8 +4,13 @@ title: lineChunk import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Divides a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) into chunks of a specified length. diff --git a/versioned_docs/version-7.1.0/api/lineEach.mdx b/versioned_docs/version-7.1.0/api/lineEach.mdx index a8d178c9..1249e56b 100644 --- a/versioned_docs/version-7.1.0/api/lineEach.mdx +++ b/versioned_docs/version-7.1.0/api/lineEach.mdx @@ -4,8 +4,13 @@ title: lineEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries, diff --git a/versioned_docs/version-7.1.0/api/lineIntersect.mdx b/versioned_docs/version-7.1.0/api/lineIntersect.mdx index 571653d2..8c94bbcf 100644 --- a/versioned_docs/version-7.1.0/api/lineIntersect.mdx +++ b/versioned_docs/version-7.1.0/api/lineIntersect.mdx @@ -4,8 +4,13 @@ title: lineIntersect import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon GeoJSON and returns the intersecting point(s). diff --git a/versioned_docs/version-7.1.0/api/lineOffset.mdx b/versioned_docs/version-7.1.0/api/lineOffset.mdx index a58b65bc..c300868e 100644 --- a/versioned_docs/version-7.1.0/api/lineOffset.mdx +++ b/versioned_docs/version-7.1.0/api/lineOffset.mdx @@ -4,8 +4,13 @@ title: lineOffset import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) and returns a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4) at offset by the specified distance. diff --git a/versioned_docs/version-7.1.0/api/lineOverlap.mdx b/versioned_docs/version-7.1.0/api/lineOverlap.mdx index cbf4151f..2d27c9d2 100644 --- a/versioned_docs/version-7.1.0/api/lineOverlap.mdx +++ b/versioned_docs/version-7.1.0/api/lineOverlap.mdx @@ -4,8 +4,13 @@ title: lineOverlap import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes any LineString or Polygon and returns the overlapping lines between both features. diff --git a/versioned_docs/version-7.1.0/api/lineReduce.mdx b/versioned_docs/version-7.1.0/api/lineReduce.mdx index a10d4848..4626e5eb 100644 --- a/versioned_docs/version-7.1.0/api/lineReduce.mdx +++ b/versioned_docs/version-7.1.0/api/lineReduce.mdx @@ -4,8 +4,13 @@ title: lineReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce features in any GeoJSON object, similar to Array.reduce(). diff --git a/versioned_docs/version-7.1.0/api/lineSegment.mdx b/versioned_docs/version-7.1.0/api/lineSegment.mdx index b8b71a04..d0b74b01 100644 --- a/versioned_docs/version-7.1.0/api/lineSegment.mdx +++ b/versioned_docs/version-7.1.0/api/lineSegment.mdx @@ -4,8 +4,13 @@ title: lineSegment import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) of 2-vertex [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) segments from a diff --git a/versioned_docs/version-7.1.0/api/lineSlice.mdx b/versioned_docs/version-7.1.0/api/lineSlice.mdx index 6fa1ffa6..8d74b043 100644 --- a/versioned_docs/version-7.1.0/api/lineSlice.mdx +++ b/versioned_docs/version-7.1.0/api/lineSlice.mdx @@ -4,8 +4,13 @@ title: lineSlice import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), and a stop point diff --git a/versioned_docs/version-7.1.0/api/lineSliceAlong.mdx b/versioned_docs/version-7.1.0/api/lineSliceAlong.mdx index 309f54a9..ed2e16ad 100644 --- a/versioned_docs/version-7.1.0/api/lineSliceAlong.mdx +++ b/versioned_docs/version-7.1.0/api/lineSliceAlong.mdx @@ -4,8 +4,13 @@ title: lineSliceAlong import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [line](https://tools.ietf.org/html/rfc7946#section-3.1.4), a specified distance along the line to a start [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-7.1.0/api/lineSplit.mdx b/versioned_docs/version-7.1.0/api/lineSplit.mdx index 8167dbeb..10274bf6 100644 --- a/versioned_docs/version-7.1.0/api/lineSplit.mdx +++ b/versioned_docs/version-7.1.0/api/lineSplit.mdx @@ -4,8 +4,13 @@ title: lineSplit import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Split a LineString by another GeoJSON Feature. diff --git a/versioned_docs/version-7.1.0/api/lineString.mdx b/versioned_docs/version-7.1.0/api/lineString.mdx index 8c0dc22c..dd256bc5 100644 --- a/versioned_docs/version-7.1.0/api/lineString.mdx +++ b/versioned_docs/version-7.1.0/api/lineString.mdx @@ -4,8 +4,13 @@ title: lineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of Positions. diff --git a/versioned_docs/version-7.1.0/api/lineStrings.mdx b/versioned_docs/version-7.1.0/api/lineStrings.mdx index 62406b85..0f313ce3 100644 --- a/versioned_docs/version-7.1.0/api/lineStrings.mdx +++ b/versioned_docs/version-7.1.0/api/lineStrings.mdx @@ -4,8 +4,13 @@ title: lineStrings import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of LineString coordinates. diff --git a/versioned_docs/version-7.1.0/api/lineToPolygon.mdx b/versioned_docs/version-7.1.0/api/lineToPolygon.mdx index 1c28fc94..d92c0e66 100644 --- a/versioned_docs/version-7.1.0/api/lineToPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/lineToPolygon.mdx @@ -4,8 +4,13 @@ title: lineToPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts (Multi)LineString(s) to Polygon(s). diff --git a/versioned_docs/version-7.1.0/api/mask.mdx b/versioned_docs/version-7.1.0/api/mask.mdx index 4aff6c98..d7cd90fe 100644 --- a/versioned_docs/version-7.1.0/api/mask.mdx +++ b/versioned_docs/version-7.1.0/api/mask.mdx @@ -4,8 +4,13 @@ title: mask import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes polygons or multipolygons and an optional mask, and returns an exterior diff --git a/versioned_docs/version-7.1.0/api/mean.mdx b/versioned_docs/version-7.1.0/api/mean.mdx index a543462e..839730cb 100644 --- a/versioned_docs/version-7.1.0/api/mean.mdx +++ b/versioned_docs/version-7.1.0/api/mean.mdx @@ -4,8 +4,13 @@ title: mean import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get mean of a list diff --git a/versioned_docs/version-7.1.0/api/midpoint.mdx b/versioned_docs/version-7.1.0/api/midpoint.mdx index 21e978ae..a5a927c8 100644 --- a/versioned_docs/version-7.1.0/api/midpoint.mdx +++ b/versioned_docs/version-7.1.0/api/midpoint.mdx @@ -4,8 +4,13 @@ title: midpoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two points and returns a point midway between them. The midpoint is diff --git a/versioned_docs/version-7.1.0/api/moranIndex.mdx b/versioned_docs/version-7.1.0/api/moranIndex.mdx index aa3d1690..8697c425 100644 --- a/versioned_docs/version-7.1.0/api/moranIndex.mdx +++ b/versioned_docs/version-7.1.0/api/moranIndex.mdx @@ -4,8 +4,13 @@ title: moranIndex import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moran's I measures patterns of attribute values associated with features. diff --git a/versioned_docs/version-7.1.0/api/multiLineString.mdx b/versioned_docs/version-7.1.0/api/multiLineString.mdx index a59b3c00..0aef3202 100644 --- a/versioned_docs/version-7.1.0/api/multiLineString.mdx +++ b/versioned_docs/version-7.1.0/api/multiLineString.mdx @@ -4,8 +4,13 @@ title: multiLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)\> based on a diff --git a/versioned_docs/version-7.1.0/api/multiPoint.mdx b/versioned_docs/version-7.1.0/api/multiPoint.mdx index 34010a4c..a983545b 100644 --- a/versioned_docs/version-7.1.0/api/multiPoint.mdx +++ b/versioned_docs/version-7.1.0/api/multiPoint.mdx @@ -4,8 +4,13 @@ title: multiPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)\> based on a diff --git a/versioned_docs/version-7.1.0/api/multiPolygon.mdx b/versioned_docs/version-7.1.0/api/multiPolygon.mdx index 4f2bd283..970f7738 100644 --- a/versioned_docs/version-7.1.0/api/multiPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/multiPolygon.mdx @@ -4,8 +4,13 @@ title: multiPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)\<[MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7)\> based on a diff --git a/versioned_docs/version-7.1.0/api/nearestPoint.mdx b/versioned_docs/version-7.1.0/api/nearestPoint.mdx index 33d52fe4..80aa7bf1 100644 --- a/versioned_docs/version-7.1.0/api/nearestPoint.mdx +++ b/versioned_docs/version-7.1.0/api/nearestPoint.mdx @@ -4,8 +4,13 @@ title: nearestPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a reference [point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a FeatureCollection of Features diff --git a/versioned_docs/version-7.1.0/api/nearestPointOnLine.mdx b/versioned_docs/version-7.1.0/api/nearestPointOnLine.mdx index 86708bd0..f3899b8b 100644 --- a/versioned_docs/version-7.1.0/api/nearestPointOnLine.mdx +++ b/versioned_docs/version-7.1.0/api/nearestPointOnLine.mdx @@ -4,8 +4,13 @@ title: nearestPointOnLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and calculates the closest Point on the (Multi)LineString. diff --git a/versioned_docs/version-7.1.0/api/nearestPointToLine.mdx b/versioned_docs/version-7.1.0/api/nearestPointToLine.mdx index 5ab15271..c0b58f7a 100644 --- a/versioned_docs/version-7.1.0/api/nearestPointToLine.mdx +++ b/versioned_docs/version-7.1.0/api/nearestPointToLine.mdx @@ -4,8 +4,13 @@ title: nearestPointToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the closest [point](https://tools.ietf.org/html/rfc7946#section-3.1.2), of a [collection](https://tools.ietf.org/html/rfc7946#section-3.3) of points, diff --git a/versioned_docs/version-7.1.0/api/pNormDistance.mdx b/versioned_docs/version-7.1.0/api/pNormDistance.mdx index f5097df5..a8f8c5dc 100644 --- a/versioned_docs/version-7.1.0/api/pNormDistance.mdx +++ b/versioned_docs/version-7.1.0/api/pNormDistance.mdx @@ -4,8 +4,13 @@ title: pNormDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description calcualte the Minkowski p-norm distance between two features. diff --git a/versioned_docs/version-7.1.0/api/planepoint.mdx b/versioned_docs/version-7.1.0/api/planepoint.mdx index aac314c5..bec6f2c8 100644 --- a/versioned_docs/version-7.1.0/api/planepoint.mdx +++ b/versioned_docs/version-7.1.0/api/planepoint.mdx @@ -4,8 +4,13 @@ title: planepoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a triangular plane as a polygon and a point within that triangle, and diff --git a/versioned_docs/version-7.1.0/api/point.mdx b/versioned_docs/version-7.1.0/api/point.mdx index d9b8ceeb..da304234 100644 --- a/versioned_docs/version-7.1.0/api/point.mdx +++ b/versioned_docs/version-7.1.0/api/point.mdx @@ -4,8 +4,13 @@ title: point import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from a Position. diff --git a/versioned_docs/version-7.1.0/api/pointGrid.mdx b/versioned_docs/version-7.1.0/api/pointGrid.mdx index 94550864..a6bc9ada 100644 --- a/versioned_docs/version-7.1.0/api/pointGrid.mdx +++ b/versioned_docs/version-7.1.0/api/pointGrid.mdx @@ -4,8 +4,13 @@ title: pointGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a grid of points diff --git a/versioned_docs/version-7.1.0/api/pointOnFeature.mdx b/versioned_docs/version-7.1.0/api/pointOnFeature.mdx index 4df04799..2eedb19a 100644 --- a/versioned_docs/version-7.1.0/api/pointOnFeature.mdx +++ b/versioned_docs/version-7.1.0/api/pointOnFeature.mdx @@ -4,8 +4,13 @@ title: pointOnFeature import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) guaranteed to be on the surface of the feature. diff --git a/versioned_docs/version-7.1.0/api/pointToLineDistance.mdx b/versioned_docs/version-7.1.0/api/pointToLineDistance.mdx index b9b75148..30ec368a 100644 --- a/versioned_docs/version-7.1.0/api/pointToLineDistance.mdx +++ b/versioned_docs/version-7.1.0/api/pointToLineDistance.mdx @@ -4,8 +4,13 @@ title: pointToLineDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the minimum distance between a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), being the distance from a line the diff --git a/versioned_docs/version-7.1.0/api/points.mdx b/versioned_docs/version-7.1.0/api/points.mdx index 63aa23b8..ef130722 100644 --- a/versioned_docs/version-7.1.0/api/points.mdx +++ b/versioned_docs/version-7.1.0/api/points.mdx @@ -4,8 +4,13 @@ title: points import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Point coordinates. diff --git a/versioned_docs/version-7.1.0/api/pointsWithinPolygon.mdx b/versioned_docs/version-7.1.0/api/pointsWithinPolygon.mdx index c22f9358..cdb7ba43 100644 --- a/versioned_docs/version-7.1.0/api/pointsWithinPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/pointsWithinPolygon.mdx @@ -4,8 +4,13 @@ title: pointsWithinPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds [Points](https://tools.ietf.org/html/rfc7946#section-3.1.2) or [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3) coordinate positions that fall within [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.1.0/api/polygon.mdx b/versioned_docs/version-7.1.0/api/polygon.mdx index 6ba3c362..d58e4c31 100644 --- a/versioned_docs/version-7.1.0/api/polygon.mdx +++ b/versioned_docs/version-7.1.0/api/polygon.mdx @@ -4,8 +4,13 @@ title: polygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) from an Array of LinearRings. diff --git a/versioned_docs/version-7.1.0/api/polygonSmooth.mdx b/versioned_docs/version-7.1.0/api/polygonSmooth.mdx index 4133075d..a2a8ef0a 100644 --- a/versioned_docs/version-7.1.0/api/polygonSmooth.mdx +++ b/versioned_docs/version-7.1.0/api/polygonSmooth.mdx @@ -4,8 +4,13 @@ title: polygonSmooth import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Smooths a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7). Based on [Chaikin's algorithm](http://graphics.cs.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html). diff --git a/versioned_docs/version-7.1.0/api/polygonTangents.mdx b/versioned_docs/version-7.1.0/api/polygonTangents.mdx index 72f78c88..7bb58eea 100644 --- a/versioned_docs/version-7.1.0/api/polygonTangents.mdx +++ b/versioned_docs/version-7.1.0/api/polygonTangents.mdx @@ -4,8 +4,13 @@ title: polygonTangents import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Finds the tangents of a [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) from a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2). diff --git a/versioned_docs/version-7.1.0/api/polygonToLine.mdx b/versioned_docs/version-7.1.0/api/polygonToLine.mdx index e20319a7..a4e32818 100644 --- a/versioned_docs/version-7.1.0/api/polygonToLine.mdx +++ b/versioned_docs/version-7.1.0/api/polygonToLine.mdx @@ -4,8 +4,13 @@ title: polygonToLine import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) to [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) to a diff --git a/versioned_docs/version-7.1.0/api/polygonize.mdx b/versioned_docs/version-7.1.0/api/polygonize.mdx index a092a155..ae74d231 100644 --- a/versioned_docs/version-7.1.0/api/polygonize.mdx +++ b/versioned_docs/version-7.1.0/api/polygonize.mdx @@ -4,8 +4,13 @@ title: polygonize import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Polygonizes [(Multi)LineString(s)](https://tools.ietf.org/html/rfc7946#section-3.1.4) into [Polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6). diff --git a/versioned_docs/version-7.1.0/api/polygons.mdx b/versioned_docs/version-7.1.0/api/polygons.mdx index 6da5aa0a..2adfce00 100644 --- a/versioned_docs/version-7.1.0/api/polygons.mdx +++ b/versioned_docs/version-7.1.0/api/polygons.mdx @@ -4,8 +4,13 @@ title: polygons import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) from an Array of Polygon coordinates. diff --git a/versioned_docs/version-7.1.0/api/propEach.mdx b/versioned_docs/version-7.1.0/api/propEach.mdx index 76b5f8c3..03758577 100644 --- a/versioned_docs/version-7.1.0/api/propEach.mdx +++ b/versioned_docs/version-7.1.0/api/propEach.mdx @@ -4,8 +4,13 @@ title: propEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over properties in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.1.0/api/propReduce.mdx b/versioned_docs/version-7.1.0/api/propReduce.mdx index 1958c44e..0045433e 100644 --- a/versioned_docs/version-7.1.0/api/propReduce.mdx +++ b/versioned_docs/version-7.1.0/api/propReduce.mdx @@ -4,8 +4,13 @@ title: propReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce properties in any GeoJSON object into a single value, diff --git a/versioned_docs/version-7.1.0/api/pt.mdx b/versioned_docs/version-7.1.0/api/pt.mdx index 983017c2..23e7985e 100644 --- a/versioned_docs/version-7.1.0/api/pt.mdx +++ b/versioned_docs/version-7.1.0/api/pt.mdx @@ -4,8 +4,13 @@ title: pt import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Translate Properties to final Point, priorities: diff --git a/versioned_docs/version-7.1.0/api/quadratAnalysis.mdx b/versioned_docs/version-7.1.0/api/quadratAnalysis.mdx index 49103125..406196df 100644 --- a/versioned_docs/version-7.1.0/api/quadratAnalysis.mdx +++ b/versioned_docs/version-7.1.0/api/quadratAnalysis.mdx @@ -4,8 +4,13 @@ title: quadratAnalysis import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Quadrat analysis lays a set of equal-size areas(quadrat) over the study area and counts diff --git a/versioned_docs/version-7.1.0/api/radiansToDegrees.mdx b/versioned_docs/version-7.1.0/api/radiansToDegrees.mdx index b5865f4d..876db7dd 100644 --- a/versioned_docs/version-7.1.0/api/radiansToDegrees.mdx +++ b/versioned_docs/version-7.1.0/api/radiansToDegrees.mdx @@ -4,8 +4,13 @@ title: radiansToDegrees import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts an angle in radians to degrees diff --git a/versioned_docs/version-7.1.0/api/radiansToLength.mdx b/versioned_docs/version-7.1.0/api/radiansToLength.mdx index 6f6660ae..9df3d968 100644 --- a/versioned_docs/version-7.1.0/api/radiansToLength.mdx +++ b/versioned_docs/version-7.1.0/api/radiansToLength.mdx @@ -4,8 +4,13 @@ title: radiansToLength import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit. diff --git a/versioned_docs/version-7.1.0/api/randomLineString.mdx b/versioned_docs/version-7.1.0/api/randomLineString.mdx index 6f877348..e59e6b87 100644 --- a/versioned_docs/version-7.1.0/api/randomLineString.mdx +++ b/versioned_docs/version-7.1.0/api/randomLineString.mdx @@ -4,8 +4,13 @@ title: randomLineString import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random linestring. diff --git a/versioned_docs/version-7.1.0/api/randomPoint.mdx b/versioned_docs/version-7.1.0/api/randomPoint.mdx index b0597990..39e696ea 100644 --- a/versioned_docs/version-7.1.0/api/randomPoint.mdx +++ b/versioned_docs/version-7.1.0/api/randomPoint.mdx @@ -4,8 +4,13 @@ title: randomPoint import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [point](point). diff --git a/versioned_docs/version-7.1.0/api/randomPolygon.mdx b/versioned_docs/version-7.1.0/api/randomPolygon.mdx index 15edd903..695b53f7 100644 --- a/versioned_docs/version-7.1.0/api/randomPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/randomPolygon.mdx @@ -4,8 +4,13 @@ title: randomPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random [polygon](polygon). diff --git a/versioned_docs/version-7.1.0/api/randomPosition.mdx b/versioned_docs/version-7.1.0/api/randomPosition.mdx index 0223d90c..fff5d198 100644 --- a/versioned_docs/version-7.1.0/api/randomPosition.mdx +++ b/versioned_docs/version-7.1.0/api/randomPosition.mdx @@ -4,8 +4,13 @@ title: randomPosition import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns a random position within a bounding box. diff --git a/versioned_docs/version-7.1.0/api/rbush.mdx b/versioned_docs/version-7.1.0/api/rbush.mdx index 2743412c..c1838d8d 100644 --- a/versioned_docs/version-7.1.0/api/rbush.mdx +++ b/versioned_docs/version-7.1.0/api/rbush.mdx @@ -4,8 +4,13 @@ title: rbush import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index. diff --git a/versioned_docs/version-7.1.0/api/rewind.mdx b/versioned_docs/version-7.1.0/api/rewind.mdx index 5f64693f..b2de9308 100644 --- a/versioned_docs/version-7.1.0/api/rewind.mdx +++ b/versioned_docs/version-7.1.0/api/rewind.mdx @@ -4,8 +4,13 @@ title: rewind import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rewind [(Multi)LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) or [(Multi)Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) outer ring counterclockwise and inner rings clockwise (Uses [Shoelace Formula](http://en.wikipedia.org/wiki/Shoelace_formula)). diff --git a/versioned_docs/version-7.1.0/api/rhumbBearing.mdx b/versioned_docs/version-7.1.0/api/rhumbBearing.mdx index ac55351d..8ed45f27 100644 --- a/versioned_docs/version-7.1.0/api/rhumbBearing.mdx +++ b/versioned_docs/version-7.1.0/api/rhumbBearing.mdx @@ -4,8 +4,13 @@ title: rhumbBearing import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and finds the bearing angle between them along a Rhumb line diff --git a/versioned_docs/version-7.1.0/api/rhumbDestination.mdx b/versioned_docs/version-7.1.0/api/rhumbDestination.mdx index be84d716..15713225 100644 --- a/versioned_docs/version-7.1.0/api/rhumbDestination.mdx +++ b/versioned_docs/version-7.1.0/api/rhumbDestination.mdx @@ -4,8 +4,13 @@ title: rhumbDestination import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the destination [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) having travelled the given distance along a Rhumb line from the diff --git a/versioned_docs/version-7.1.0/api/rhumbDistance.mdx b/versioned_docs/version-7.1.0/api/rhumbDistance.mdx index 8f5a2a38..21851bc2 100644 --- a/versioned_docs/version-7.1.0/api/rhumbDistance.mdx +++ b/versioned_docs/version-7.1.0/api/rhumbDistance.mdx @@ -4,8 +4,13 @@ title: rhumbDistance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Calculates the distance along a rhumb line between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians, diff --git a/versioned_docs/version-7.1.0/api/round.mdx b/versioned_docs/version-7.1.0/api/round.mdx index 88cc2896..9eea0511 100644 --- a/versioned_docs/version-7.1.0/api/round.mdx +++ b/versioned_docs/version-7.1.0/api/round.mdx @@ -4,8 +4,13 @@ title: round import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Round number to precision diff --git a/versioned_docs/version-7.1.0/api/sample.mdx b/versioned_docs/version-7.1.0/api/sample.mdx index 8a128fe0..4c98213a 100644 --- a/versioned_docs/version-7.1.0/api/sample.mdx +++ b/versioned_docs/version-7.1.0/api/sample.mdx @@ -4,8 +4,13 @@ title: sample import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) and returns a FeatureCollection with given number of [features](https://tools.ietf.org/html/rfc7946#section-3.2) at random. diff --git a/versioned_docs/version-7.1.0/api/sector.mdx b/versioned_docs/version-7.1.0/api/sector.mdx index e8c61c5e..9d952e63 100644 --- a/versioned_docs/version-7.1.0/api/sector.mdx +++ b/versioned_docs/version-7.1.0/api/sector.mdx @@ -4,8 +4,13 @@ title: sector import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a circular sector of a circle of given radius and center [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), diff --git a/versioned_docs/version-7.1.0/api/segmentEach.mdx b/versioned_docs/version-7.1.0/api/segmentEach.mdx index 102f07ef..e295b143 100644 --- a/versioned_docs/version-7.1.0/api/segmentEach.mdx +++ b/versioned_docs/version-7.1.0/api/segmentEach.mdx @@ -4,8 +4,13 @@ title: segmentEach import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach() diff --git a/versioned_docs/version-7.1.0/api/segmentReduce.mdx b/versioned_docs/version-7.1.0/api/segmentReduce.mdx index 64c210aa..94642e7d 100644 --- a/versioned_docs/version-7.1.0/api/segmentReduce.mdx +++ b/versioned_docs/version-7.1.0/api/segmentReduce.mdx @@ -4,8 +4,13 @@ title: segmentReduce import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce() diff --git a/versioned_docs/version-7.1.0/api/shortestPath.mdx b/versioned_docs/version-7.1.0/api/shortestPath.mdx index 98d72104..f6963179 100644 --- a/versioned_docs/version-7.1.0/api/shortestPath.mdx +++ b/versioned_docs/version-7.1.0/api/shortestPath.mdx @@ -4,8 +4,13 @@ title: shortestPath import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Returns the shortest [path](https://tools.ietf.org/html/rfc7946#section-3.1.4) from [start](https://tools.ietf.org/html/rfc7946#section-3.1.2) to [end](https://tools.ietf.org/html/rfc7946#section-3.1.2) without colliding with diff --git a/versioned_docs/version-7.1.0/api/simplify.mdx b/versioned_docs/version-7.1.0/api/simplify.mdx index f8b216eb..1d622d22 100644 --- a/versioned_docs/version-7.1.0/api/simplify.mdx +++ b/versioned_docs/version-7.1.0/api/simplify.mdx @@ -4,8 +4,13 @@ title: simplify import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a [GeoJSON](https://tools.ietf.org/html/rfc7946#section-3) object and returns a simplified version. Internally uses the 2d version of diff --git a/versioned_docs/version-7.1.0/api/square.mdx b/versioned_docs/version-7.1.0/api/square.mdx index 7b3677a2..ac53b545 100644 --- a/versioned_docs/version-7.1.0/api/square.mdx +++ b/versioned_docs/version-7.1.0/api/square.mdx @@ -4,8 +4,13 @@ title: square import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a bounding box and calculates the minimum square bounding box that diff --git a/versioned_docs/version-7.1.0/api/squareGrid.mdx b/versioned_docs/version-7.1.0/api/squareGrid.mdx index 8ca76a74..e5c4f5b3 100644 --- a/versioned_docs/version-7.1.0/api/squareGrid.mdx +++ b/versioned_docs/version-7.1.0/api/squareGrid.mdx @@ -4,8 +4,13 @@ title: squareGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a grid of square polygons with cell length consistent in degrees diff --git a/versioned_docs/version-7.1.0/api/standardDeviationalEllipse.mdx b/versioned_docs/version-7.1.0/api/standardDeviationalEllipse.mdx index c920a075..f9ac36a2 100644 --- a/versioned_docs/version-7.1.0/api/standardDeviationalEllipse.mdx +++ b/versioned_docs/version-7.1.0/api/standardDeviationalEllipse.mdx @@ -4,8 +4,13 @@ title: standardDeviationalEllipse import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a collection of features and returns a standard deviational ellipse, diff --git a/versioned_docs/version-7.1.0/api/tag.mdx b/versioned_docs/version-7.1.0/api/tag.mdx index 8bc0e3cb..72cb12fc 100644 --- a/versioned_docs/version-7.1.0/api/tag.mdx +++ b/versioned_docs/version-7.1.0/api/tag.mdx @@ -4,8 +4,13 @@ title: tag import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a set of [polygons](https://tools.ietf.org/html/rfc7946#section-3.1.6) and/or [multipolygons](https://tools.ietf.org/html/rfc7946#section-3.1.7) and performs a spatial join. diff --git a/versioned_docs/version-7.1.0/api/tesselate.mdx b/versioned_docs/version-7.1.0/api/tesselate.mdx index 805ed616..6fdf7912 100644 --- a/versioned_docs/version-7.1.0/api/tesselate.mdx +++ b/versioned_docs/version-7.1.0/api/tesselate.mdx @@ -4,8 +4,13 @@ title: tesselate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Tesselates a polygon or multipolygon into a collection of triangle polygons diff --git a/versioned_docs/version-7.1.0/api/tin.mdx b/versioned_docs/version-7.1.0/api/tin.mdx index 92ae9c77..4cbbcca4 100644 --- a/versioned_docs/version-7.1.0/api/tin.mdx +++ b/versioned_docs/version-7.1.0/api/tin.mdx @@ -4,8 +4,13 @@ title: tin import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a set of [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) and creates a diff --git a/versioned_docs/version-7.1.0/api/toMercator.mdx b/versioned_docs/version-7.1.0/api/toMercator.mdx index 184e5add..be6ee056 100644 --- a/versioned_docs/version-7.1.0/api/toMercator.mdx +++ b/versioned_docs/version-7.1.0/api/toMercator.mdx @@ -4,8 +4,13 @@ title: toMercator import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection diff --git a/versioned_docs/version-7.1.0/api/toWgs84.mdx b/versioned_docs/version-7.1.0/api/toWgs84.mdx index 57b48b62..e1a677d0 100644 --- a/versioned_docs/version-7.1.0/api/toWgs84.mdx +++ b/versioned_docs/version-7.1.0/api/toWgs84.mdx @@ -4,8 +4,13 @@ title: toWgs84 import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection diff --git a/versioned_docs/version-7.1.0/api/transformRotate.mdx b/versioned_docs/version-7.1.0/api/transformRotate.mdx index b88ecee4..47f8e601 100644 --- a/versioned_docs/version-7.1.0/api/transformRotate.mdx +++ b/versioned_docs/version-7.1.0/api/transformRotate.mdx @@ -4,8 +4,13 @@ title: transformRotate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point. diff --git a/versioned_docs/version-7.1.0/api/transformScale.mdx b/versioned_docs/version-7.1.0/api/transformScale.mdx index c1ef6a7e..8af9f461 100644 --- a/versioned_docs/version-7.1.0/api/transformScale.mdx +++ b/versioned_docs/version-7.1.0/api/transformScale.mdx @@ -4,8 +4,13 @@ title: transformScale import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Scale GeoJSON objects from a given point by a scaling factor e.g. factor=2 diff --git a/versioned_docs/version-7.1.0/api/transformTranslate.mdx b/versioned_docs/version-7.1.0/api/transformTranslate.mdx index 40b9dd18..9f85697c 100644 --- a/versioned_docs/version-7.1.0/api/transformTranslate.mdx +++ b/versioned_docs/version-7.1.0/api/transformTranslate.mdx @@ -4,8 +4,13 @@ title: transformTranslate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line diff --git a/versioned_docs/version-7.1.0/api/triangleGrid.mdx b/versioned_docs/version-7.1.0/api/triangleGrid.mdx index 05bd2939..b29ce153 100644 --- a/versioned_docs/version-7.1.0/api/triangleGrid.mdx +++ b/versioned_docs/version-7.1.0/api/triangleGrid.mdx @@ -4,8 +4,13 @@ title: triangleGrid import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Creates a grid of triangular polygons. diff --git a/versioned_docs/version-7.1.0/api/truncate.mdx b/versioned_docs/version-7.1.0/api/truncate.mdx index 74c6bd66..4d908ce7 100644 --- a/versioned_docs/version-7.1.0/api/truncate.mdx +++ b/versioned_docs/version-7.1.0/api/truncate.mdx @@ -4,8 +4,13 @@ title: truncate import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry. diff --git a/versioned_docs/version-7.1.0/api/union.mdx b/versioned_docs/version-7.1.0/api/union.mdx index 87c24095..b587c04c 100644 --- a/versioned_docs/version-7.1.0/api/union.mdx +++ b/versioned_docs/version-7.1.0/api/union.mdx @@ -4,8 +4,13 @@ title: union import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes input [(Multi)Polygon(s)](https://tools.ietf.org/html/rfc7946#section-3.1.6) and returns a combined polygon. If the input polygons are not contiguous, this function returns a [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7) feature. diff --git a/versioned_docs/version-7.1.0/api/unkinkPolygon.mdx b/versioned_docs/version-7.1.0/api/unkinkPolygon.mdx index bd2c3e58..5df84799 100644 --- a/versioned_docs/version-7.1.0/api/unkinkPolygon.mdx +++ b/versioned_docs/version-7.1.0/api/unkinkPolygon.mdx @@ -4,8 +4,13 @@ title: unkinkPolygon import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a kinked polygon and returns a feature collection of polygons that have diff --git a/versioned_docs/version-7.1.0/api/variance.mdx b/versioned_docs/version-7.1.0/api/variance.mdx index f238c095..57d7186a 100644 --- a/versioned_docs/version-7.1.0/api/variance.mdx +++ b/versioned_docs/version-7.1.0/api/variance.mdx @@ -4,8 +4,13 @@ title: variance import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description get variance of a list diff --git a/versioned_docs/version-7.1.0/api/voronoi.mdx b/versioned_docs/version-7.1.0/api/voronoi.mdx index fa88ea4d..53e82831 100644 --- a/versioned_docs/version-7.1.0/api/voronoi.mdx +++ b/versioned_docs/version-7.1.0/api/voronoi.mdx @@ -4,8 +4,13 @@ title: voronoi import * as turf from "turf-next"; import ExampleMap from "@site/src/components/ExampleMap"; +import WindowTurfGlobal from "@site/src/components/WindowTurfGlobal"; import BrowserOnly from "@docusaurus/BrowserOnly"; + + +{() => } + ### Description Takes a collection of points and a bounding box, and returns a collection