Merge branch 'master' into fix-cleancoords

This commit is contained in:
James Beard 2023-11-02 18:25:58 +11:00 committed by GitHub
commit dd39d0f786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
215 changed files with 8575 additions and 4759 deletions

View File

@ -14,12 +14,12 @@ const rules = {
module.exports = { module.exports = {
root: true, root: true,
ignorePatterns: ["**/dist/**"], ignorePatterns: ["**/dist/**"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"], plugins: ["@typescript-eslint"],
extends: [ extends: [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"prettier", "plugin:prettier/recommended",
"prettier/@typescript-eslint",
], ],
parserOptions: { parserOptions: {
ecmaVersion: 6, ecmaVersion: 6,

View File

@ -15,28 +15,15 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [14.x, 16.x, 18.x, 20.x] node-version: [16.x, 18.x, 20.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: "yarn"
# figure out the yarn cache directory
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# cache the yarn data to speed up builds
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile - run: yarn --frozen-lockfile
- run: git diff --exit-code - run: git diff --exit-code

View File

@ -113,14 +113,6 @@ module.exports = {
publishConfig: { publishConfig: {
access: "public", access: "public",
}, },
exports: {
"./package.json": "./package.json",
".": {
types: "./index.d.ts",
import: "./dist/es/index.js",
require: "./dist/js/index.js",
},
},
}, },
}, },
includePackages: [...TS_PACKAGES, ...JS_PACKAGES], includePackages: [...TS_PACKAGES, ...JS_PACKAGES],
@ -130,6 +122,14 @@ module.exports = {
entries: { entries: {
types: "dist/js/index.d.ts", types: "dist/js/index.d.ts",
files: ["dist"], files: ["dist"],
exports: {
"./package.json": "./package.json",
".": {
types: "./dist/js/index.d.ts",
import: "./dist/es/index.js",
require: "./dist/js/index.js",
},
},
}, },
}, },
includePackages: TS_PACKAGES, includePackages: TS_PACKAGES,
@ -139,6 +139,14 @@ module.exports = {
entries: { entries: {
types: "index.d.ts", types: "index.d.ts",
files: ["dist", "index.d.ts"], files: ["dist", "index.d.ts"],
exports: {
"./package.json": "./package.json",
".": {
types: "./index.d.ts",
import: "./dist/es/index.js",
require: "./dist/js/index.js",
},
},
}, },
}, },
includePackages: JS_PACKAGES, includePackages: JS_PACKAGES,
@ -156,8 +164,8 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
docs: "node ../../scripts/generate-readmes", docs: "tsx ../../scripts/generate-readmes",
test: "npm-run-all test:*", test: "npm-run-all --npm-path npm test:*",
}, },
}, },
excludePackages: [MAIN_PACKAGE], excludePackages: [MAIN_PACKAGE],
@ -165,7 +173,7 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
build: "npm-run-all build:*", build: "npm-run-all --npm-path npm build:*",
"build:js": "tsc", "build:js": "tsc",
"build:es": "build:es":
'tsc --outDir dist/es --module esnext --declaration false && echo \'{"type":"module"}\' > dist/es/package.json', 'tsc --outDir dist/es --module esnext --declaration false && echo \'{"type":"module"}\' > dist/es/package.json',
@ -194,7 +202,7 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
}, },
}, },
includePackages: JS_TAPE_PACKAGES, includePackages: JS_TAPE_PACKAGES,
@ -202,7 +210,7 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
}, },
}, },
includePackages: TS_TAPE_PACKAGES, includePackages: TS_TAPE_PACKAGES,
@ -210,7 +218,7 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
bench: "node -r esm bench.js", bench: "tsx bench.js",
}, },
}, },
includePackages: JS_TAPE_PACKAGES, includePackages: JS_TAPE_PACKAGES,
@ -218,7 +226,7 @@ module.exports = {
{ {
options: { options: {
scripts: { scripts: {
bench: "ts-node bench.js", bench: "tsx bench.js",
}, },
}, },
includePackages: TS_TAPE_PACKAGES, includePackages: TS_TAPE_PACKAGES,
@ -252,7 +260,7 @@ module.exports = {
tslib: "^2.3.0", tslib: "^2.3.0",
}, },
devDependencies: { devDependencies: {
"ts-node": "*", tsx: "*",
typescript: "*", typescript: "*",
}, },
}, },
@ -262,6 +270,7 @@ module.exports = {
options: { options: {
devDependencies: { devDependencies: {
rollup: "*", rollup: "*",
tsx: "*",
}, },
}, },
includePackages: JS_PACKAGES, includePackages: JS_PACKAGES,

View File

@ -10,3 +10,10 @@ packages/turf-directional-mean/test/in/bus_route_utm.json
# is actually output # is actually output
packages/turf/turf.min.js packages/turf/turf.min.js
# Ignore test fixture json in case intentional line breaks help with coord
# readability.
packages/turf-*/test/in/**
packages/turf-*/test/out/**
packages/turf-*/test/true/**
packages/turf-*/test/false/**

View File

@ -1 +1,3 @@
{} {
"trailingComma": "es5"
}

View File

@ -7,6 +7,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- Move distribution JS to target ES2017 (#2237) - Move distribution JS to target ES2017 (#2237)
- [`@turf/helpers`](helpers) Correct the conversion factor for degrees (#2177) - [`@turf/helpers`](helpers) Correct the conversion factor for degrees (#2177)
- [`@turf/helpers`](helpers) polygon() will now throw if the first and last coordinates are not the same (#2173) - [`@turf/helpers`](helpers) polygon() will now throw if the first and last coordinates are not the same (#2173)
- [`@turf/helpers`](helpers) Separate AreaUnits into its own type (#2393)
- [`@turf/area`](area) Fix earth radius to use WGS84 median earth radius (#2166) - [`@turf/area`](area) Fix earth radius to use WGS84 median earth radius (#2166)
- [`@turf/turf`](turf) Remove re-exports for turf 4.x compatability (#2183) - [`@turf/turf`](turf) Remove re-exports for turf 4.x compatability (#2183)
- [`@turf/rectangle-grid`](rectangle-grid) Fix correctness for large areas (#2106) - [`@turf/rectangle-grid`](rectangle-grid) Fix correctness for large areas (#2106)
@ -22,6 +23,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/boolean-point-in-polygon`](boolean-point-in-polygon) Move to point-in-polygon-hao library for performance and correctness (#1893) - [`@turf/boolean-point-in-polygon`](boolean-point-in-polygon) Move to point-in-polygon-hao library for performance and correctness (#1893)
- [`@turf/line-intersect`][line-intersect] Move to sweepline-intersections library for performance (#2033) - [`@turf/line-intersect`][line-intersect] Move to sweepline-intersections library for performance (#2033)
- [`@turf/boolean-contains`](boolean-contains) Add multipolygon support (#2338) - [`@turf/boolean-contains`](boolean-contains) Add multipolygon support (#2338)
- [`@turf/nearest-point`](nearest-point) Add unit option (#2415)
## 🐛 Bug Fixes ## 🐛 Bug Fixes
- [`@turf/polygon-smooth`](polygon-smooth) Options argument is now actually optional (#2149) - [`@turf/polygon-smooth`](polygon-smooth) Options argument is now actually optional (#2149)
@ -42,6 +44,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/boolean-within`](boolean-within) Fix multipoint checks (#2216) - [`@turf/boolean-within`](boolean-within) Fix multipoint checks (#2216)
- [`@turf/points-within-polygon`](points-within-polygon) Fix dropped properties on MultiPoint results (#2227) - [`@turf/points-within-polygon`](points-within-polygon) Fix dropped properties on MultiPoint results (#2227)
- [`@turf/random`](random) Throws error on invalid bbox inputs (#2172) - [`@turf/random`](random) Throws error on invalid bbox inputs (#2172)
- [`@turf/boolean-parallel`](boolean-parallel) Lines with 180 degree angle between them are also considered parallel (#2475)
- [`@turf/unkink-polygon`](unkink-polygon) Fix a maximum call stack size exceeded error with very large polygons (#2504)
- [`@turf/line-arc`](line-arc) Number of arc segments generated wasn't related to steps value passed in (#2524)
## 📖 Documentation ## 📖 Documentation
- [`@turf/bbox`][bbox] Improve documentation (#2153) - [`@turf/bbox`][bbox] Improve documentation (#2153)
@ -52,6 +57,9 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/buffer`](buffer) Clean up Typescript types (#2188) - [`@turf/buffer`](buffer) Clean up Typescript types (#2188)
- [`@turf/polygon-smooth`](polygon-smooth) Clean up a typo (#2293) - [`@turf/polygon-smooth`](polygon-smooth) Clean up a typo (#2293)
- [`@turf/nearest-point-on-line`](nearest-point-on-line) Clean up typescript types (#2296) - [`@turf/nearest-point-on-line`](nearest-point-on-line) Clean up typescript types (#2296)
- [`@turf/boolean-touches`](boolean-touches) Add boolean-touches to docs (#2431)
- [`@turf/boolean-equals`](boolean-equals) Improve docs (#2412)
- Remove Bower references (#2146) - Remove Bower references (#2146)
- Fix typo in README (#2313) - Fix typo in README (#2313)
- Lots of cleanup for CONTRIBUTING, README, and RELEASING (#2186) - Lots of cleanup for CONTRIBUTING, README, and RELEASING (#2186)
@ -63,6 +71,7 @@ We intend to keep making breaking changes before 7.0.0 is fully released. If you
- [`@turf/turf](turf) Add booleanTouches export (#2170) - [`@turf/turf](turf) Add booleanTouches export (#2170)
- [`@turf/turf](turf) Add booleanConcave export (#2265) - [`@turf/turf](turf) Add booleanConcave export (#2265)
- [`@turf/helpers](helpers) Make isObject a little more accurate (#2176) - [`@turf/helpers](helpers) Make isObject a little more accurate (#2176)
- Add custom types entry point to exports, required by Typescript for node16, nodenext and bundler module resolution strategies (#2400, #2452)
- types.ts tests are now run in strict mode (#2363) - types.ts tests are now run in strict mode (#2363)
- Uses tslib now for smaller bundles (#2165) - Uses tslib now for smaller bundles (#2165)
- Remove object-assign dependency from all packages (#2241) - Remove object-assign dependency from all packages (#2241)

View File

@ -143,6 +143,7 @@ toc:
- booleanParallel - booleanParallel
- booleanPointInPolygon - booleanPointInPolygon
- booleanPointOnLine - booleanPointOnLine
- booleanTouches
- booleanWithin - booleanWithin
- name: Unit Conversion - name: Unit Conversion
- bearingToAzimuth - bearingToAzimuth

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -1,16 +1,9 @@
{ {
"packages": [ "npmClient": "yarn",
"packages/*" "version": "7.0.0-alpha.2",
],
"command": { "command": {
"bootstrap": {
"useWorkspaces": true,
"ignoreScripts": true
},
"publish": { "publish": {
"registry": "https://registry.npmjs.org" "registry": "https://registry.npmjs.org"
} }
}, }
"npmClient": "yarn",
"version": "7.0.0-alpha.0"
} }

22
nx.json Normal file
View File

@ -0,0 +1,22 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test", "last-checks"]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"]
},
"test": {
"dependsOn": ["^test"]
},
"last-checks": {
"dependsOn": ["^last-checks"]
}
}
}

View File

@ -13,7 +13,7 @@
"lint:escheck-esm": "es-check --module es8 packages/*/dist/es/index.js", "lint:escheck-esm": "es-check --module es8 packages/*/dist/es/index.js",
"lint:escheck-es5": "es-check es5 packages/turf/turf.min.js", "lint:escheck-es5": "es-check es5 packages/turf/turf.min.js",
"postlint": "documentation lint packages/turf-*/index.js", "postlint": "documentation lint packages/turf-*/index.js",
"prepare": "lerna bootstrap && lerna run build && node ./scripts/add-import-extensions.js", "prepare": "lerna run build && node ./scripts/add-import-extensions.js",
"pretest": "npm run lint", "pretest": "npm run lint",
"test": "lerna run test", "test": "lerna run test",
"posttest": "lerna run --scope @turf/turf last-checks", "posttest": "lerna run --scope @turf/turf last-checks",
@ -39,33 +39,35 @@
}, },
"devDependencies": { "devDependencies": {
"@types/geojson": "7946.0.8", "@types/geojson": "7946.0.8",
"@types/node": "^17.0.2", "@types/node": "18.11.9",
"@typescript-eslint/eslint-plugin": "^4.8.0", "@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^4.8.0", "@typescript-eslint/parser": "^6.8.0",
"acorn": "^7.4.1", "acorn": "^7.4.1",
"camelcase": "*", "camelcase": "*",
"d3-queue": "*", "d3-queue": "*",
"decamelize": "*", "decamelize": "*",
"dependency-tree": "^8.1.2", "dependency-tree": "^8.1.2",
"documentation": "^13.2.5", "documentation": "^14.0.2",
"es-check": "^5.1.4", "es-check": "^7.1.1",
"eslint": "~7.13.0", "eslint": "^8.51.0",
"eslint-config-prettier": "^6.15.0", "eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"esm": "^3.2.25", "esm": "^3.2.25",
"fs-extra": "*", "fs-extra": "*",
"husky": "^4.2.3", "husky": "^4.2.3",
"lerna": "^4.0.0", "lerna": "^7.3.0",
"lint-staged": "^10.0.8", "lint-staged": "^10.0.8",
"load-json-file": "*", "load-json-file": "*",
"meow": "*", "meow": "*",
"monorepolint": "^0.5.0-alpha.20", "monorepolint": "^0.5.0-alpha.20",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.1.2", "prettier": "^3.0.3",
"progress": "*", "progress": "*",
"rollup": "^2.34.2", "rollup": "^2.34.2",
"tape": "*", "tape": "^5.7.0",
"ts-node": "^9.0.0", "ts-node": "^9.0.0",
"typescript": "^3.8.3", "tsx": "^3.12.8",
"typescript": "^5.2.2",
"yamljs": "*" "yamljs": "*"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/along", "name": "@turf/along",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf along module", "description": "turf along module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,13 +39,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -53,16 +53,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bearing": "^7.0.0-alpha.0", "@turf/bearing": "^7.0.0-alpha.2",
"@turf/destination": "^7.0.0-alpha.0", "@turf/destination": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/angle", "name": "@turf/angle",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf angle module", "description": "turf angle module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,34 +39,33 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/sector": "^7.0.0-alpha.0", "@turf/sector": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"glob": "*", "glob": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bearing": "^7.0.0-alpha.0", "@turf/bearing": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/rhumb-bearing": "^7.0.0-alpha.0", "@turf/rhumb-bearing": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -17,22 +17,69 @@
[ [
[124, -22], [124, -22],
[124, -20.333333], [124, -20.333333],
[124.174203, -20.341268], [124.04425, -20.333844],
[124.346782, -20.364998], [124.088474, -20.335376],
[124.51613, -20.404302], [124.132644, -20.337929],
[124.680665, -20.458813], [124.176735, -20.341501],
[124.838844, -20.528022], [124.22072, -20.346089],
[124.989183, -20.611283], [124.264573, -20.351692],
[125.130261, -20.707815], [124.308266, -20.358305],
[125.260739, -20.816714], [124.351775, -20.365925],
[125.379367, -20.936957], [124.395073, -20.374547],
[125.485003, -21.067412], [124.438134, -20.384166],
[125.576614, -21.206849], [124.480932, -20.394777],
[125.653297, -21.353949], [124.523441, -20.406372],
[125.714277, -21.507317], [124.565636, -20.418945],
[125.758928, -21.665495], [124.607491, -20.432488],
[125.786768, -21.826973], [124.648981, -20.446993],
[125.797475, -21.990207], [124.690081, -20.462452],
[124.730767, -20.478855],
[124.771013, -20.496192],
[124.810795, -20.514453],
[124.850089, -20.533627],
[124.888872, -20.553702],
[124.92712, -20.574667],
[124.964809, -20.596508],
[125.001917, -20.619212],
[125.038421, -20.642766],
[125.074299, -20.667156],
[125.109529, -20.692366],
[125.144089, -20.718382],
[125.177958, -20.745187],
[125.211115, -20.772767],
[125.24354, -20.801103],
[125.275212, -20.830179],
[125.306113, -20.859977],
[125.336223, -20.89048],
[125.365524, -20.921668],
[125.393996, -20.953523],
[125.421623, -20.986025],
[125.448387, -21.019156],
[125.474271, -21.052893],
[125.499259, -21.087218],
[125.523336, -21.122109],
[125.546485, -21.157546],
[125.568692, -21.193505],
[125.589943, -21.229966],
[125.610224, -21.266907],
[125.629523, -21.304304],
[125.647826, -21.342135],
[125.665122, -21.380377],
[125.681399, -21.419006],
[125.696646, -21.457999],
[125.710855, -21.497332],
[125.724014, -21.536981],
[125.736115, -21.576922],
[125.74715, -21.617129],
[125.757111, -21.657579],
[125.76599, -21.698246],
[125.773783, -21.739105],
[125.780482, -21.780132],
[125.786084, -21.8213],
[125.790582, -21.862586],
[125.793975, -21.903962],
[125.796258, -21.945403],
[125.797429, -21.986885],
[125.797488, -22.028381], [125.797488, -22.028381],
[124, -22] [124, -22]
] ]
@ -55,53 +102,69 @@
[ [
[124, -22], [124, -22],
[126.696439, -22.035218], [126.696439, -22.035218],
[126.682054, -22.280117], [126.688162, -22.218141],
[126.641725, -22.522527], [126.665416, -22.400012],
[126.57571, -22.760099], [126.628265, -22.579849],
[126.484516, -22.990519], [126.576855, -22.75668],
[126.368908, -23.211528], [126.511409, -22.929545],
[126.229905, -23.420951], [126.43223, -23.097499],
[126.068769, -23.616713], [126.339701, -23.259623],
[125.887005, -23.796867], [126.234279, -23.415026],
[125.686343, -23.95961], [126.116502, -23.56285],
[125.468726, -24.10331], [125.986979, -23.702275],
[125.236289, -24.226515], [125.846392, -23.832527],
[124.991339, -24.327981], [125.695492, -23.952877],
[124.73633, -24.406676], [125.535093, -24.062653],
[124.473834, -24.4618], [125.366071, -24.161238],
[124.206514, -24.49279], [125.189356, -24.248076],
[123.937089, -24.499332], [125.005929, -24.322678],
[123.668306, -24.481357], [124.816814, -24.384621],
[123.402902, -24.439049], [124.623073, -24.433554],
[123.143573, -24.372841], [124.4258, -24.4692],
[122.892945, -24.283405], [124.22611, -24.491355],
[122.653537, -24.171653], [124.025137, -24.499893],
[122.427739, -24.038715], [123.82402, -24.494767],
[122.21778, -23.885936], [123.623903, -24.476005],
[122.025708, -23.714854], [123.425921, -24.443714],
[121.853369, -23.527183], [123.231195, -24.398077],
[121.702389, -23.324795], [123.040823, -24.339354],
[121.574161, -23.1097], [122.855878, -24.267878],
[121.469836, -22.884023], [122.677392, -24.184053],
[121.390312, -22.64998], [122.506359, -24.088353],
[121.336236, -22.40986], [122.343722, -23.981317],
[121.307999, -22.165995], [122.19037, -23.863547],
[121.305736, -21.920743], [122.047134, -23.735703],
[121.329335, -21.676463], [121.91478, -23.598499],
[121.378441, -21.435492], [121.794008, -23.452698],
[121.452461, -21.200124], [121.685447, -23.29911],
[121.550581, -20.972591], [121.589651, -23.138582],
[121.671769, -20.755038], [121.507098, -22.971999],
[121.814793, -20.549511], [121.43819, -22.800274],
[121.978233, -20.357933], [121.383249, -22.624344],
[122.160497, -20.182091], [121.34252, -22.445167],
[122.359832, -20.023623], [121.316165, -22.263713],
[122.574347, -19.883997], [121.304272, -22.080961],
[122.802024, -19.764507], [121.306846, -21.897892],
[123.040738, -19.666255], [121.323819, -21.715488],
[123.288275, -19.590147], [121.355046, -21.53472],
[123.54235, -19.536886], [121.400308, -21.356549],
[123.800626, -19.50696], [121.459317, -21.181918],
[121.531712, -21.011749],
[121.617071, -20.846936],
[121.714905, -20.688343],
[121.824667, -20.5368],
[121.94575, -20.393097],
[122.077498, -20.25798],
[122.2192, -20.132151],
[122.370104, -20.016261],
[122.529412, -19.910908],
[122.696289, -19.816638],
[122.869865, -19.733934],
[123.049239, -19.663222],
[123.233486, -19.604865],
[123.421658, -19.559163],
[123.612788, -19.526351],
[123.805898, -19.506596],
[124, -19.5], [124, -19.5],
[124, -22] [124, -22]
] ]

View File

@ -17,15 +17,69 @@
[ [
[51.5, 12], [51.5, 12],
[50.487833, 9.836074], [50.487833, 9.836074],
[50.277234, 9.943461], [50.455818, 9.850776],
[50.078172, 10.070529], [50.424022, 9.865934],
[49.892538, 10.216077], [50.392451, 9.881546],
[49.722103, 10.378729], [50.361111, 9.897607],
[49.5685, 10.556944], [50.33001, 9.914115],
[49.433213, 10.749034], [50.299154, 9.931065],
[49.317557, 10.953174], [50.268549, 9.948455],
[49.22267, 11.167425], [50.238202, 9.966281],
[49.1495, 11.389745], [50.20812, 9.984538],
[50.178308, 10.003224],
[50.148772, 10.022334],
[50.11952, 10.041864],
[50.090557, 10.06181],
[50.06189, 10.082168],
[50.033523, 10.102934],
[50.005465, 10.124103],
[49.977719, 10.145671],
[49.950293, 10.167633],
[49.923192, 10.189986],
[49.896422, 10.212723],
[49.869988, 10.23584],
[49.843896, 10.259333],
[49.818152, 10.283196],
[49.792761, 10.307425],
[49.767728, 10.332014],
[49.743059, 10.356958],
[49.718759, 10.382253],
[49.694834, 10.407892],
[49.671288, 10.43387],
[49.648126, 10.460182],
[49.625353, 10.486822],
[49.602975, 10.513785],
[49.580996, 10.541065],
[49.559421, 10.568656],
[49.538254, 10.596553],
[49.5175, 10.624749],
[49.497163, 10.653239],
[49.477248, 10.682016],
[49.45776, 10.711075],
[49.438701, 10.740409],
[49.420077, 10.770013],
[49.401892, 10.79988],
[49.384149, 10.830003],
[49.366852, 10.860377],
[49.350005, 10.890995],
[49.333613, 10.92185],
[49.317677, 10.952936],
[49.302203, 10.984247],
[49.287192, 11.015775],
[49.27265, 11.047515],
[49.258578, 11.079459],
[49.24498, 11.1116],
[49.231858, 11.143933],
[49.219217, 11.17645],
[49.207059, 11.209144],
[49.195385, 11.242008],
[49.1842, 11.275035],
[49.173506, 11.308219],
[49.163304, 11.341552],
[49.153598, 11.375027],
[49.144389, 11.408638],
[49.13568, 11.442376],
[49.127473, 11.476235],
[49.119769, 11.510208], [49.119769, 11.510208],
[51.5, 12] [51.5, 12]
] ]
@ -48,60 +102,69 @@
[ [
[51.5, 12], [51.5, 12],
[47.932822, 11.25803], [47.932822, 11.25803],
[47.873567, 11.603477], [47.880206, 11.551701],
[47.848992, 11.952945], [47.852657, 11.848643],
[47.859463, 12.303091], [47.850444, 12.1468],
[47.905017, 12.650551], [47.873667, 12.4441],
[47.985359, 12.991975], [47.922251, 12.738471],
[48.099856, 13.324054], [47.995945, 13.027852],
[48.247537, 13.643558], [48.094321, 13.310212],
[48.4271, 13.947363], [48.216776, 13.583558],
[48.636914, 14.232484], [48.362528, 13.845956],
[48.875029, 14.496108], [48.530626, 14.095541],
[49.139195, 14.735622], [48.719947, 14.330532],
[49.426877, 14.948639], [48.929209, 14.549244],
[49.735278, 15.133032], [49.156971, 14.750105],
[50.06137, 15.286948], [49.401646, 14.931665],
[50.401919, 15.40884], [49.661512, 15.092608],
[50.753526, 15.497476], [49.934722, 15.231766],
[51.112662, 15.551961], [50.21932, 15.348124],
[51.475707, 15.571742], [50.513252, 15.440832],
[51.838997, 15.556618], [50.814387, 15.509212],
[52.198865, 15.506745], [51.120533, 15.552762],
[52.551684, 15.422625], [51.429455, 15.571163],
[52.893911, 15.305111], [51.738892, 15.564279],
[53.222124, 15.155389], [52.046582, 15.532161],
[53.533069, 14.974966], [52.350276, 15.475046],
[53.823685, 14.765654], [52.647759, 15.393351],
[54.091144, 14.529547], [52.93687, 15.287676],
[54.332875, 14.268996], [53.215519, 15.158792],
[54.546588, 13.986587], [53.481702, 15.007641],
[54.730293, 13.685109], [53.733522, 14.835322],
[54.882315, 13.367523], [53.969197, 14.643085],
[55.001308, 13.036939], [54.187077, 14.43232],
[55.086255, 12.696573], [54.385654, 14.204546],
[55.13648, 12.349726], [54.563573, 13.961397],
[55.151641, 11.999745], [54.719638, 13.704611],
[55.131733, 11.649992], [54.852817, 13.436018],
[55.077077, 11.303816], [54.962251, 13.157522],
[54.988318, 10.964519], [55.047257, 12.871091],
[54.866411, 10.635327], [55.107326, 12.57874],
[54.712609, 10.319362], [55.142126, 12.282518],
[54.528451, 10.019612], [55.151503, 11.984494],
[54.315747, 9.738906], [55.135477, 11.686742],
[54.076559, 9.479888], [55.094241, 11.391327],
[53.813179, 9.244997], [55.028156, 11.100292],
[53.528116, 9.036438], [54.93775, 10.815644],
[53.224067, 8.85617], [54.823708, 10.539341],
[52.903896, 8.705883], [54.68687, 10.27328],
[52.570607, 8.586988], [54.528225, 10.019281],
[52.227323, 8.500597], [54.3489, 9.779083],
[51.87725, 8.447521], [54.150154, 9.554324],
[51.523657, 8.428256], [53.933373, 9.346538],
[51.169844, 8.442984], [53.700055, 9.157138],
[50.819111, 8.491566], [53.451804, 8.987415],
[50.474732, 8.573548], [53.190318, 8.838522],
[50.139926, 8.68816], [52.917382, 8.71147],
[52.634852, 8.607124],
[52.344643, 8.526191],
[52.048723, 8.46922],
[51.749093, 8.4366],
[51.447779, 8.42855],
[51.146818, 8.445126],
[50.848244, 8.486215],
[50.554078, 8.551539],
[50.266308, 8.640653],
[49.986887, 8.752953], [49.986887, 8.752953],
[51.5, 12] [51.5, 12]
] ]

View File

@ -17,60 +17,69 @@
[ [
[51.5, 12], [51.5, 12],
[49.15854, 11.518357], [49.15854, 11.518357],
[49.120638, 11.745143], [49.124843, 11.711158],
[49.10556, 11.974473], [49.107647, 11.906037],
[49.113507, 12.204146], [49.107107, 12.101642],
[49.144464, 12.431952], [49.123262, 12.296609],
[49.19819, 12.655692], [49.156037, 12.489577],
[49.274228, 12.873202], [49.205239, 12.679197],
[49.371897, 13.082371], [49.27056, 12.864137],
[49.490303, 13.281165], [49.351579, 13.043099],
[49.628345, 13.467643], [49.447757, 13.214821],
[49.784718, 13.639982], [49.55845, 13.37809],
[49.957931, 13.79649], [49.682904, 13.531749],
[50.146315, 13.935628], [49.820264, 13.674709],
[50.348045, 14.056025], [49.969578, 13.805952],
[50.561151, 14.156492], [50.129802, 13.924543],
[50.783542, 14.236033], [50.299812, 14.029634],
[51.013027, 14.293862], [50.478406, 14.120476],
[51.247338, 14.329405], [50.664316, 14.196415],
[51.484154, 14.342308], [50.856218, 14.256907],
[51.721127, 14.332443], [51.052739, 14.301518],
[51.955908, 14.299909], [51.252473, 14.329928],
[52.18617, 14.245028], [51.453985, 14.34193],
[52.409637, 14.168345], [51.655827, 14.33744],
[52.624106, 14.07062], [51.85655, 14.31649],
[52.827472, 13.95282], [52.054711, 14.279229],
[53.017749, 13.81611], [52.248891, 14.225927],
[53.193088, 13.661836], [52.437699, 14.156966],
[53.3518, 13.491517], [52.619788, 14.072842],
[53.49237, 13.306824], [52.793863, 13.974157],
[53.613467, 13.109566], [52.958691, 13.861619],
[53.713962, 12.901666], [53.113112, 13.736031],
[53.792933, 12.685149], [53.256043, 13.598289],
[53.849671, 12.462117], [53.38649, 13.449375],
[53.883687, 12.234728], [53.503554, 13.290346],
[53.894713, 12.005176], [53.606434, 13.122329],
[53.882703, 11.775673], [53.694435, 12.946513],
[53.84783, 11.548421], [53.766969, 12.764138],
[53.790482, 11.325597], [53.823562, 12.576487],
[53.711258, 11.10933], [53.863854, 12.384879],
[53.610958, 10.901685], [53.887599, 12.190654],
[53.490579, 10.704637], [53.894669, 11.995171],
[53.351299, 10.520059], [53.885052, 11.799792],
[53.194469, 10.349702], [53.858849, 11.605877],
[53.0216, 10.195182], [53.816276, 11.414772],
[52.834345, 10.057961], [53.757661, 11.227801],
[52.634489, 9.939336], [53.683439, 11.046258],
[52.423929, 9.84043], [53.594149, 10.871395],
[52.204659, 9.762175], [53.490431, 10.704419],
[51.978749, 9.70531], [53.373021, 10.54648],
[51.74833, 9.670372], [53.242743, 10.398663],
[51.515573, 9.657691], [53.100509, 10.261983],
[51.282669, 9.667386], [52.947306, 10.137378],
[51.051812, 9.699366], [52.784194, 10.025703],
[50.825175, 9.753328], [52.612299, 9.927722],
[50.604897, 9.828765], [52.4328, 9.844107],
[52.246931, 9.775428],
[52.055961, 9.722157],
[51.861198, 9.684656],
[51.66397, 9.663183],
[51.465624, 9.657885],
[51.267512, 9.668796],
[51.070987, 9.695843],
[50.877388, 9.738842],
[50.688039, 9.797497],
[50.504234, 9.871408], [50.504234, 9.871408],
[51.5, 12] [51.5, 12]
] ]
@ -93,15 +102,69 @@
[ [
[51.5, 12], [51.5, 12],
[50.011338, 8.805989], [50.011338, 8.805989],
[49.701359, 8.963929], [49.964224, 8.827611],
[49.408212, 9.150836], [49.917429, 8.849905],
[49.134662, 9.364957], [49.870962, 8.872865],
[48.883305, 9.60428], [49.824834, 8.896487],
[48.656539, 9.866554], [49.779053, 8.920766],
[48.456547, 10.14931], [49.733629, 8.945697],
[48.285274, 10.449882], [49.688572, 8.971274],
[48.144412, 10.76543], [49.643892, 8.997493],
[48.035382, 11.092966], [49.599597, 9.024348],
[49.555696, 9.051832],
[49.5122, 9.079942],
[49.469117, 9.10867],
[49.426456, 9.138011],
[49.384226, 9.167958],
[49.342435, 9.198506],
[49.301094, 9.229647],
[49.26021, 9.261376],
[49.219792, 9.293686],
[49.179848, 9.32657],
[49.140388, 9.360022],
[49.101419, 9.394034],
[49.062949, 9.428599],
[49.024986, 9.46371],
[48.98754, 9.499359],
[48.950617, 9.53554],
[48.914225, 9.572245],
[48.878372, 9.609465],
[48.843067, 9.647194],
[48.808315, 9.685423],
[48.774125, 9.724145],
[48.740504, 9.763351],
[48.707459, 9.803033],
[48.674998, 9.843183],
[48.643126, 9.883792],
[48.611852, 9.924852],
[48.581181, 9.966355],
[48.551121, 10.008291],
[48.521677, 10.050652],
[48.492857, 10.093429],
[48.464666, 10.136613],
[48.437111, 10.180196],
[48.410197, 10.224167],
[48.38393, 10.268518],
[48.358317, 10.313239],
[48.333362, 10.358321],
[48.309072, 10.403755],
[48.285451, 10.449531],
[48.262506, 10.495639],
[48.24024, 10.54207],
[48.218658, 10.588814],
[48.197767, 10.635862],
[48.17757, 10.683202],
[48.158072, 10.730826],
[48.139277, 10.778723],
[48.121189, 10.826884],
[48.103814, 10.875298],
[48.087154, 10.923954],
[48.071213, 10.972843],
[48.055996, 11.021955],
[48.041505, 11.071279],
[48.027744, 11.120804],
[48.014717, 11.17052],
[48.002426, 11.220418],
[47.990875, 11.270485], [47.990875, 11.270485],
[51.5, 12] [51.5, 12]
] ]

View File

@ -17,27 +17,69 @@
[ [
[51.5, 12], [51.5, 12],
[50.487833, 9.836074], [50.487833, 9.836074],
[50.277234, 9.943461], [50.415688, 9.870001],
[50.078172, 10.070529], [50.344705, 9.906244],
[49.892538, 10.216077], [50.274961, 9.944764],
[49.722103, 10.378729], [50.20653, 9.985519],
[49.5685, 10.556944], [50.139487, 10.028467],
[49.433213, 10.749034], [50.073904, 10.07356],
[49.317557, 10.953174], [50.009852, 10.120751],
[49.22267, 11.167425], [49.9474, 10.169988],
[49.1495, 11.389745], [49.886617, 10.221219],
[49.098792, 11.618014], [49.827567, 10.274389],
[49.071086, 11.850048], [49.770315, 10.32944],
[49.066705, 12.083622], [49.714924, 10.386313],
[49.08575, 12.316494], [49.661454, 10.444947],
[49.128101, 12.546418], [49.609964, 10.505278],
[49.193411, 12.771173], [49.56051, 10.567243],
[49.281108, 12.988582], [49.513147, 10.630774],
[49.390402, 13.196533], [49.467926, 10.695802],
[49.520282, 13.392999], [49.424898, 10.762257],
[49.669531, 13.57606], [49.384111, 10.830068],
[49.836735, 13.743922], [49.34561, 10.899161],
[50.020291, 13.894936], [49.309438, 10.969462],
[49.275636, 11.040894],
[49.244242, 11.113381],
[49.215292, 11.186844],
[49.188819, 11.261202],
[49.164853, 11.336377],
[49.143422, 11.412286],
[49.124552, 11.488846],
[49.108264, 11.565975],
[49.09458, 11.643588],
[49.083515, 11.721602],
[49.075084, 11.79993],
[49.069299, 11.878489],
[49.066168, 11.957192],
[49.065696, 12.035953],
[49.067887, 12.114687],
[49.072741, 12.193306],
[49.080254, 12.271725],
[49.090421, 12.349859],
[49.103233, 12.427621],
[49.118679, 12.504926],
[49.136743, 12.58169],
[49.157408, 12.657827],
[49.180655, 12.733254],
[49.206459, 12.807888],
[49.234795, 12.881646],
[49.265633, 12.954447],
[49.298942, 13.026211],
[49.334688, 13.096859],
[49.372832, 13.166311],
[49.413335, 13.234492],
[49.456154, 13.301325],
[49.501244, 13.366736],
[49.548555, 13.430652],
[49.598038, 13.493003],
[49.64964, 13.553719],
[49.703304, 13.612733],
[49.758972, 13.669977],
[49.816583, 13.72539],
[49.876076, 13.778908],
[49.937384, 13.830471],
[50.000441, 13.880023],
[50.065177, 13.927507],
[50.131521, 13.972871], [50.131521, 13.972871],
[51.5, 12] [51.5, 12]
] ]
@ -60,48 +102,69 @@
[ [
[51.5, 12], [51.5, 12],
[49.438664, 14.956465], [49.438664, 14.956465],
[49.747822, 15.139689], [49.641509, 15.081264],
[50.074546, 15.29237], [49.85254, 15.192891],
[50.415597, 15.412972], [50.07084, 15.290851],
[50.767569, 15.500276], [50.295457, 15.374712],
[51.126927, 15.5534], [50.525406, 15.4441],
[51.490051, 15.571806], [50.759673, 15.498708],
[51.853276, 15.555308], [50.997223, 15.538293],
[52.212935, 15.504072], [51.237005, 15.562678],
[52.565402, 15.418617], [51.477954, 15.571755],
[52.90714, 15.299808], [51.719002, 15.565483],
[53.234733, 15.148845], [51.959077, 15.543891],
[53.544933, 14.967247], [52.197114, 15.507073],
[53.834688, 14.756837], [52.432059, 15.455195],
[54.101179, 14.51972], [52.662874, 15.388488],
[54.341847, 14.258257], [52.88854, 15.307247],
[54.554412, 13.975042], [53.108067, 15.211834],
[54.736897, 13.672871], [53.320497, 15.10267],
[54.887641, 13.354713], [53.524905, 14.98024],
[55.005307, 13.023681], [53.720408, 14.845083],
[55.088896, 12.682997], [53.906169, 14.697794],
[55.137743, 12.335963], [54.081395, 14.539021],
[55.151519, 11.985927], [54.245349, 14.369457],
[55.130232, 11.636252], [54.397344, 14.189844],
[55.074218, 11.290285], [54.536752, 14.000964],
[54.984132, 10.951326], [54.663004, 13.803636],
[54.860941, 10.622597], [54.775592, 13.598714],
[54.705911, 10.307216], [54.874069, 13.387083],
[54.520592, 10.008164], [54.958053, 13.169651],
[54.306803, 9.728265], [55.027225, 12.947351],
[54.066616, 9.470154], [55.081334, 12.721134],
[53.802332, 9.236261], [55.12019, 12.491961],
[53.516469, 9.028782], [55.143671, 12.260809],
[53.211729, 8.849666], [55.15172, 12.028654],
[52.890982, 8.700592], [55.144342, 11.796478],
[52.55724, 8.582959], [55.121608, 11.565259],
[52.213626, 8.497869], [55.083651, 11.33597],
[51.863352, 8.446119], [55.030665, 11.10957],
[51.509688, 8.428193], [54.962907, 10.887009],
[51.155934, 8.444261], [54.880689, 10.669215],
[50.80539, 8.494171], [54.784382, 10.457096],
[50.461328, 8.577455], [54.674414, 10.251534],
[50.126964, 8.693334], [54.551265, 10.053385],
[54.415465, 9.86347],
[54.267596, 9.682576],
[54.108285, 9.511453],
[53.938204, 9.350808],
[53.758066, 9.201305],
[53.568623, 9.063562],
[53.370664, 8.938146],
[53.165008, 8.825577],
[52.952508, 8.726317],
[52.73404, 8.640776],
[52.510503, 8.569307],
[52.282818, 8.512204],
[52.051921, 8.469703],
[51.818759, 8.441978],
[51.584289, 8.429144],
[51.349473, 8.431253],
[51.115275, 8.448297],
[50.882655, 8.480206],
[50.652569, 8.526848],
[50.42596, 8.588031],
[50.203762, 8.663503],
[49.986887, 8.752953], [49.986887, 8.752953],
[51.5, 12] [51.5, 12]
] ]

View File

@ -17,44 +17,69 @@
[ [
[51.5, 12], [51.5, 12],
[50.487833, 9.836074], [50.487833, 9.836074],
[50.277234, 9.943461], [50.358618, 9.898909],
[50.078172, 10.070529], [50.233379, 9.969168],
[49.892538, 10.216077], [50.112553, 10.046605],
[49.722103, 10.378729], [49.996566, 10.130951],
[49.5685, 10.556944], [49.885824, 10.22191],
[49.433213, 10.749034], [49.780719, 10.319164],
[49.317557, 10.953174], [49.681622, 10.422375],
[49.22267, 11.167425], [49.588884, 10.53118],
[49.1495, 11.389745], [49.502838, 10.6452],
[49.098792, 11.618014], [49.42379, 10.764034],
[49.071086, 11.850048], [49.352026, 10.887265],
[49.066705, 12.083622], [49.287806, 11.014462],
[49.08575, 12.316494], [49.231365, 11.145177],
[49.128101, 12.546418], [49.18291, 11.278951],
[49.193411, 12.771173], [49.142624, 11.415312],
[49.281108, 12.988582], [49.11066, 11.553779],
[49.390402, 13.196533], [49.087142, 11.693864],
[49.520282, 13.392999], [49.072167, 11.835071],
[49.669531, 13.57606], [49.0658, 11.976901],
[49.836735, 13.743922], [49.068078, 12.11885],
[50.020291, 13.894936], [49.079005, 12.260414],
[50.218425, 14.027614], [49.098557, 12.401089],
[50.429209, 14.140647], [49.126679, 12.540375],
[50.650581, 14.232917], [49.163284, 12.677773],
[50.880362, 14.30351], [49.208255, 12.812793],
[51.116285, 14.351725], [49.261445, 12.944952],
[51.356013, 14.377083], [49.322676, 13.073774],
[51.59717, 14.379333], [49.391742, 13.198797],
[51.837362, 14.358452], [49.468406, 13.31957],
[52.074209, 14.314647], [49.552404, 13.435659],
[52.305363, 14.248355], [49.643443, 13.546643],
[52.528542, 14.160231], [49.741204, 13.65212],
[52.741549, 14.051151], [49.845343, 13.751709],
[52.942296, 13.922192], [49.95549, 13.845048],
[53.128828, 13.77463], [50.071254, 13.931797],
[53.29934, 13.609917], [50.192218, 14.011641],
[53.452195, 13.429673], [50.317949, 14.084288],
[53.58594, 13.235665], [50.447992, 14.149474],
[50.581878, 14.206959],
[50.719119, 14.256534],
[50.859217, 14.298017],
[51.001659, 14.331256],
[51.145927, 14.356129],
[51.291492, 14.372545],
[51.43782, 14.380443],
[51.584377, 14.379796],
[51.730624, 14.370604],
[51.876026, 14.352902],
[52.020051, 14.326755],
[52.162172, 14.292258],
[52.301869, 14.249539],
[52.438634, 14.198753],
[52.571968, 14.140087],
[52.701388, 14.073756],
[52.826426, 14],
[52.94663, 13.919091],
[53.061568, 13.831323],
[53.17083, 13.737014],
[53.274026, 13.636509],
[53.37079, 13.530172],
[53.460782, 13.418389],
[53.543687, 13.301563],
[53.619216, 13.180118],
[53.68711, 13.05449], [53.68711, 13.05449],
[51.5, 12] [51.5, 12]
] ]
@ -77,31 +102,69 @@
[ [
[51.5, 12], [51.5, 12],
[54.787546, 13.574894], [54.787546, 13.574894],
[54.928068, 13.252368], [54.846609, 13.449936],
[55.035164, 12.917965], [54.900628, 13.32285],
[55.107937, 12.574936], [54.949533, 13.193828],
[55.145829, 12.226602], [54.993256, 13.063064],
[55.148618, 11.876317], [55.031743, 12.930753],
[55.116414, 11.527444], [55.064944, 12.797093],
[55.049653, 11.183318], [55.092818, 12.662285],
[54.94909, 10.847218], [55.115333, 12.526529],
[54.815787, 10.522337], [55.132464, 12.390028],
[54.6511, 10.211751], [55.144195, 12.252984],
[54.456665, 9.918397], [55.150515, 12.1156],
[54.234382, 9.645041], [55.151426, 11.97808],
[53.986397, 9.394258], [55.146932, 11.840628],
[53.715082, 9.168405], [55.13705, 11.703446],
[53.423013, 8.969603], [55.121802, 11.566736],
[53.112949, 8.79972], [55.101218, 11.430701],
[52.787806, 8.660347], [55.075335, 11.29554],
[52.450635, 8.552793], [55.044199, 11.161451],
[52.104588, 8.478063], [55.007863, 11.028631],
[51.7529, 8.436859], [54.966386, 10.897275],
[51.398853, 8.429567], [54.919835, 10.767575],
[51.045749, 8.456255], [54.868285, 10.639721],
[50.696883, 8.516673], [54.811817, 10.513899],
[50.355514, 8.610255], [54.750517, 10.390292],
[50.024832, 8.736124], [54.684482, 10.269082],
[54.61381, 10.150444],
[54.538611, 10.034551],
[54.458997, 9.921571],
[54.375087, 9.81167],
[54.287007, 9.705005],
[54.194889, 9.601733],
[54.098867, 9.502002],
[53.999084, 9.405957],
[53.895687, 9.313739],
[53.788828, 9.225479],
[53.678662, 9.141306],
[53.565351, 9.061341],
[53.449059, 8.985701],
[53.329956, 8.914495],
[53.208215, 8.847825],
[53.084012, 8.785788],
[52.957528, 8.728474],
[52.828944, 8.675965],
[52.698447, 8.628338],
[52.566224, 8.585661],
[52.432468, 8.547995],
[52.29737, 8.515396],
[52.161125, 8.48791],
[52.023929, 8.465577],
[51.88598, 8.448429],
[51.747475, 8.436491],
[51.608615, 8.42978],
[51.469598, 8.428306],
[51.330626, 8.432071],
[51.191897, 8.441069],
[51.05361, 8.455288],
[50.915966, 8.474707],
[50.779162, 8.499299],
[50.643394, 8.529026],
[50.508859, 8.563847],
[50.37575, 8.603712],
[50.244259, 8.648562],
[50.114576, 8.698333],
[49.986887, 8.752953], [49.986887, 8.752953],
[51.5, 12] [51.5, 12]
] ]

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/area", "name": "@turf/area",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf area module", "description": "turf area module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -27,7 +27,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -38,13 +38,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -52,14 +52,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -37,7 +37,7 @@ import { lineclip, polygonclip } from "./lib/lineclip";
*/ */
export default function bboxClip< export default function bboxClip<
G extends Polygon | MultiPolygon | LineString | MultiLineString, G extends Polygon | MultiPolygon | LineString | MultiLineString,
P = GeoJsonProperties P extends GeoJsonProperties = GeoJsonProperties,
>(feature: Feature<G, P> | G, bbox: BBox) { >(feature: Feature<G, P> | G, bbox: BBox) {
const geom = getGeom(feature); const geom = getGeom(feature);
const type = geom.type; const type = geom.type;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/bbox-clip", "name": "@turf/bbox-clip",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf bbox-clip module", "description": "turf bbox-clip module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -33,7 +33,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -44,29 +44,28 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -18,7 +18,9 @@ import { polygon, Id } from "@turf/helpers";
* //addToMap * //addToMap
* var addToMap = [poly] * var addToMap = [poly]
*/ */
export default function bboxPolygon<P = GeoJsonProperties>( export default function bboxPolygon<
P extends GeoJsonProperties = GeoJsonProperties,
>(
bbox: BBox, bbox: BBox,
options: { options: {
properties?: P; properties?: P;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/bbox-polygon", "name": "@turf/bbox-polygon",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf bbox-polygon module", "description": "turf bbox-polygon module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,25 +39,24 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/bbox", "name": "@turf/bbox",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf bbox module", "description": "turf bbox module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,26 +40,25 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/bearing", "name": "@turf/bearing",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf bearing module", "description": "turf bearing module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -25,7 +25,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -36,28 +36,27 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@turf/destination": "^7.0.0-alpha.0", "@turf/destination": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -33,7 +33,7 @@ import Spline from "./lib/spline";
* var addToMap = [line, curved] * var addToMap = [line, curved]
* curved.properties = { stroke: '#0F0' }; * curved.properties = { stroke: '#0F0' };
*/ */
function bezier<P = GeoJsonProperties>( function bezier<P extends GeoJsonProperties = GeoJsonProperties>(
line: Feature<LineString> | LineString, line: Feature<LineString> | LineString,
options: { options: {
properties?: P; properties?: P;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/bezier-spline", "name": "@turf/bezier-spline",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf bezier-spline module", "description": "turf bezier-spline module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,13 +39,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -53,14 +53,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-clockwise", "name": "@turf/boolean-clockwise",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-clockwise module", "description": "turf boolean-clockwise module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -32,7 +32,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -43,13 +43,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -58,13 +58,12 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-concave", "name": "@turf/boolean-concave",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-concave module", "description": "turf boolean-concave module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -57,13 +57,12 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-contains", "name": "@turf/boolean-contains",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-contains module", "description": "turf boolean-contains module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -59,16 +59,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/boolean-point-on-line": "^7.0.0-alpha.0", "@turf/boolean-point-on-line": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-crosses", "name": "@turf/boolean-crosses",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-crosses module", "description": "turf boolean-crosses module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -58,16 +58,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/line-intersect": "^7.0.0-alpha.0", "@turf/line-intersect": "^7.0.0-alpha.2",
"@turf/polygon-to-line": "^7.0.0-alpha.0", "@turf/polygon-to-line": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-disjoint", "name": "@turf/boolean-disjoint",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-disjoint module", "description": "turf boolean-disjoint module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -57,16 +57,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/line-intersect": "^7.0.0-alpha.0", "@turf/line-intersect": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@turf/polygon-to-line": "^7.0.0-alpha.0", "@turf/polygon-to-line": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -4,7 +4,7 @@
## booleanEqual ## booleanEqual
Determine whether two geometries of the same type have identical X,Y coordinate values. Determines whether two geometries or features of the same type have identical X,Y coordinate values and properties.
See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm][1] See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm][1]
### Parameters ### Parameters
@ -21,11 +21,17 @@ See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relatio
var pt1 = turf.point([0, 0]); var pt1 = turf.point([0, 0]);
var pt2 = turf.point([0, 0]); var pt2 = turf.point([0, 0]);
var pt3 = turf.point([1, 1]); var pt3 = turf.point([1, 1]);
var pt4 = turf.point([0, 0], {prop: 'A'});
var pt5 = turf.point([0, 0], {prop: 'B'});
turf.booleanEqual(pt1, pt2); turf.booleanEqual(pt1, pt2);
//= true //= true
turf.booleanEqual(pt2, pt3); turf.booleanEqual(pt2, pt3);
//= false //= false
turf.booleanEqual(pt4, pt5);
//= false
turf.booleanEqual(pt4.geometry, pt5.geometry);
//= true
``` ```
Returns **[boolean][6]** true if the objects are equal, false otherwise Returns **[boolean][6]** true if the objects are equal, false otherwise
@ -70,4 +76,4 @@ $ npm install @turf/turf
### Diagrams ### Diagrams
![esri-equals](diagrams/esri-equals.gif) ![esri-equals](diagrams/esri-equals.gif)

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-equal", "name": "@turf/boolean-equal",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-equal module", "description": "turf boolean-equal module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -34,7 +34,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -45,13 +45,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/geojson-equality": "^0.2.0", "@types/geojson-equality": "^0.2.0",
@ -62,14 +62,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clean-coords": "^7.0.0-alpha.0", "@turf/clean-coords": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"geojson-equality": "0.1.6", "geojson-equality": "0.1.6",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -55,24 +55,30 @@ const line2 = lineString([
[8, 50], [8, 50],
[9, 50], [9, 50],
]); ]);
const poly1 = polygon([ const poly1 = polygon(
[ [
[8.5, 50], [
[9.5, 50], [8.5, 50],
[9.5, 49], [9.5, 50],
[8.5, 49], [9.5, 49],
[8.5, 50], [8.5, 49],
[8.5, 50],
],
], ],
]); { prop: "A" }
const poly2 = polygon([ );
const poly2 = polygon(
[ [
[8.5, 50], [
[9.5, 50], [8.5, 50],
[9.5, 49], [9.5, 50],
[8.5, 49], [9.5, 49],
[8.5, 50], [8.5, 49],
[8.5, 50],
],
], ],
]); { prop: "B" }
);
const poly3 = polygon([ const poly3 = polygon([
[ [
[10, 50], [10, 50],
@ -82,12 +88,26 @@ const poly3 = polygon([
[10, 50], [10, 50],
], ],
]); ]);
const poly4 = polygon(
[
[
[8.5, 50],
[9.5, 50],
[9.5, 49],
[8.5, 49],
[8.5, 50],
],
],
{ prop: "A" }
);
test("turf-boolean-equal -- geometries", (t) => { test("turf-boolean-equal -- geometries", (t) => {
t.true(equal(line1.geometry, line2.geometry), "[true] LineString geometry"); t.true(equal(line1.geometry, line2.geometry), "[true] LineString geometry");
t.true(equal(poly1.geometry, poly2.geometry), "[true] Polygon geometry"); t.true(equal(poly1.geometry, poly2.geometry), "[true] Polygon geometry");
t.true(equal(poly1, poly4), "[true] Polygon feature");
t.false(equal(poly1.geometry, poly3.geometry), "[false] Polygon geometry"); t.false(equal(poly1.geometry, poly3.geometry), "[false] Polygon geometry");
t.false(equal(pt, line1), "[false] different types"); t.false(equal(pt, line1), "[false] different types");
t.false(equal(poly1, poly2), "[false] different properties");
t.end(); t.end();
}); });

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-intersects", "name": "@turf/boolean-intersects",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-intersects module", "description": "turf boolean-intersects module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -57,14 +57,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/boolean-disjoint": "^7.0.0-alpha.0", "@turf/boolean-disjoint": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-overlap", "name": "@turf/boolean-overlap",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-overlap module", "description": "turf boolean-overlap module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -33,7 +33,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -44,13 +44,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/geojson-equality": "^0.2.0", "@types/geojson-equality": "^0.2.0",
@ -61,16 +61,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/line-intersect": "^7.0.0-alpha.0", "@turf/line-intersect": "^7.0.0-alpha.2",
"@turf/line-overlap": "^7.0.0-alpha.0", "@turf/line-overlap": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"geojson-equality": "0.1.6", "geojson-equality": "0.1.6",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -53,7 +53,7 @@ function booleanParallel(
function isParallel(segment1: Position[], segment2: Position[]) { function isParallel(segment1: Position[], segment2: Position[]) {
var slope1 = bearingToAzimuth(rhumbBearing(segment1[0], segment1[1])); var slope1 = bearingToAzimuth(rhumbBearing(segment1[0], segment1[1]));
var slope2 = bearingToAzimuth(rhumbBearing(segment2[0], segment2[1])); var slope2 = bearingToAzimuth(rhumbBearing(segment2[0], segment2[1]));
return slope1 === slope2; return slope1 === slope2 || (slope2 - slope1) % 180 === 0;
} }
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-parallel", "name": "@turf/boolean-parallel",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-parallel module", "description": "turf boolean-parallel module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -30,7 +30,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -41,13 +41,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -55,16 +55,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clean-coords": "^7.0.0-alpha.0", "@turf/clean-coords": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/line-segment": "^7.0.0-alpha.0", "@turf/line-segment": "^7.0.0-alpha.2",
"@turf/rhumb-bearing": "^7.0.0-alpha.0", "@turf/rhumb-bearing": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -0,0 +1,27 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[0, 0],
[1, 0]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[1, 0],
[0, 0]
]
}
}
]
}

View File

@ -0,0 +1,27 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[0, 0],
[0, 1]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[1, 0],
[1, 1]
]
}
}
]
}

View File

@ -0,0 +1,27 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-10, 20, 0],
[-10, 10, 0]
]
}
},
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-20, 20, 0],
[-20, 10, 0]
]
}
}
]
}

View File

@ -38,7 +38,7 @@ import { getCoord, getGeom } from "@turf/invariant";
*/ */
export default function booleanPointInPolygon< export default function booleanPointInPolygon<
G extends Polygon | MultiPolygon, G extends Polygon | MultiPolygon,
P = GeoJsonProperties P extends GeoJsonProperties = GeoJsonProperties,
>( >(
point: Coord, point: Coord,
polygon: Feature<G, P> | G, polygon: Feature<G, P> | G,

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-point-in-polygon", "name": "@turf/boolean-point-in-polygon",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-point-in-polygon module", "description": "turf boolean-point-in-polygon module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,26 +40,25 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"point-in-polygon-hao": "^1.1.0", "point-in-polygon-hao": "^1.1.0",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-point-on-line", "name": "@turf/boolean-point-on-line",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-point-on-line module", "description": "turf boolean-point-on-line module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,13 +39,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -54,14 +54,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-touches", "name": "@turf/boolean-touches",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-touches module", "description": "turf boolean-touches module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -32,7 +32,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -43,13 +43,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -61,15 +61,14 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/boolean-point-on-line": "^7.0.0-alpha.0", "@turf/boolean-point-on-line": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-valid", "name": "@turf/boolean-valid",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-valid module", "description": "turf boolean-valid module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -59,20 +59,19 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/boolean-crosses": "^7.0.0-alpha.0", "@turf/boolean-crosses": "^7.0.0-alpha.2",
"@turf/boolean-disjoint": "^7.0.0-alpha.0", "@turf/boolean-disjoint": "^7.0.0-alpha.2",
"@turf/boolean-overlap": "^7.0.0-alpha.0", "@turf/boolean-overlap": "^7.0.0-alpha.2",
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/boolean-point-on-line": "^7.0.0-alpha.0", "@turf/boolean-point-on-line": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/line-intersect": "^7.0.0-alpha.0", "@turf/line-intersect": "^7.0.0-alpha.2",
"geojson-polygon-self-intersections": "1.2.x", "geojson-polygon-self-intersections": "1.2.x",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/boolean-within", "name": "@turf/boolean-within",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf boolean-within module", "description": "turf boolean-within module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -32,7 +32,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -43,13 +43,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -61,16 +61,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/boolean-point-on-line": "^7.0.0-alpha.0", "@turf/boolean-point-on-line": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,5 +1,5 @@
import center from "@turf/center"; import center from "@turf/center";
import { BufferOp, GeoJSONReader, GeoJSONWriter } from "@turf/jsts"; import jsts from "@turf/jsts";
import { geomEach, featureEach } from "@turf/meta"; import { geomEach, featureEach } from "@turf/meta";
import { geoAzimuthalEquidistant } from "d3-geo"; import { geoAzimuthalEquidistant } from "d3-geo";
import { import {
@ -10,6 +10,8 @@ import {
earthRadius, earthRadius,
} from "@turf/helpers"; } from "@turf/helpers";
const { BufferOp, GeoJSONReader, GeoJSONWriter } = jsts;
/** /**
* Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. * Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
* *

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/buffer", "name": "@turf/buffer",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf buffer module", "description": "turf buffer module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -47,29 +47,30 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/center": "^7.0.0-alpha.0", "@turf/center": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/jsts": "^2.7.1", "@turf/jsts": "^2.7.1",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@turf/projection": "^7.0.0-alpha.0", "@turf/projection": "^7.0.0-alpha.2",
"d3-geo": "1.7.1" "d3-geo": "1.7.1"
} }
} }

View File

@ -28,7 +28,7 @@ import { isNumber, point, Id } from "@turf/helpers";
* mean.properties['marker-size'] = 'large'; * mean.properties['marker-size'] = 'large';
* mean.properties['marker-color'] = '#000'; * mean.properties['marker-color'] = '#000';
*/ */
function centerMean<P = GeoJsonProperties>( function centerMean<P extends GeoJsonProperties = GeoJsonProperties>(
geojson: any, // To-Do include Typescript AllGeoJSON geojson: any, // To-Do include Typescript AllGeoJSON
options: { properties?: P; bbox?: BBox; id?: Id; weight?: string } = {} options: { properties?: P; bbox?: BBox; id?: Id; weight?: string } = {}
): Feature<Point, P> { ): Feature<Point, P> {

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/center-mean", "name": "@turf/center-mean",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf center-mean module", "description": "turf center-mean module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -33,7 +33,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -44,33 +44,32 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/center": "^7.0.0-alpha.0", "@turf/center": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"glob": "*", "glob": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/center-median", "name": "@turf/center-median",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf center-median module", "description": "turf center-median module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,35 +39,34 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@turf/center": "^7.0.0-alpha.0", "@turf/center": "^7.0.0-alpha.2",
"@turf/center-of-mass": "^7.0.0-alpha.0", "@turf/center-of-mass": "^7.0.0-alpha.2",
"@turf/random": "^7.0.0-alpha.0", "@turf/random": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/center-mean": "^7.0.0-alpha.0", "@turf/center-mean": "^7.0.0-alpha.2",
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -21,7 +21,7 @@ import { coordEach } from "@turf/meta";
* //addToMap * //addToMap
* var addToMap = [polygon, center] * var addToMap = [polygon, center]
*/ */
function centerOfMass<P = GeoJsonProperties>( function centerOfMass<P extends GeoJsonProperties = GeoJsonProperties>(
geojson: any, geojson: any,
options: { options: {
properties?: P; properties?: P;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/center-of-mass", "name": "@turf/center-of-mass",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf center-of-mass module", "description": "turf center-of-mass module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -25,7 +25,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -36,13 +36,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -52,17 +52,16 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/convex": "^7.0.0-alpha.0", "@turf/convex": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -26,7 +26,7 @@ import { point, Id, AllGeoJSON } from "@turf/helpers";
* center.properties['marker-size'] = 'large'; * center.properties['marker-size'] = 'large';
* center.properties['marker-color'] = '#000'; * center.properties['marker-color'] = '#000';
*/ */
function center<P = GeoJsonProperties>( function center<P extends GeoJsonProperties = GeoJsonProperties>(
geojson: AllGeoJSON, geojson: AllGeoJSON,
options: { properties?: P; bbox?: BBox; id?: Id } = {} options: { properties?: P; bbox?: BBox; id?: Id } = {}
): Feature<Point, P> { ): Feature<Point, P> {

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/center", "name": "@turf/center",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf center module", "description": "turf center module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,32 +40,31 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/bbox-polygon": "^7.0.0-alpha.0", "@turf/bbox-polygon": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"glob": "*", "glob": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -18,7 +18,7 @@ import { coordEach } from "@turf/meta";
* //addToMap * //addToMap
* var addToMap = [polygon, centroid] * var addToMap = [polygon, centroid]
*/ */
function centroid<P = GeoJsonProperties>( function centroid<P extends GeoJsonProperties = GeoJsonProperties>(
geojson: AllGeoJSON, geojson: AllGeoJSON,
options: { options: {
properties?: P; properties?: P;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/centroid", "name": "@turf/centroid",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf centroid module", "description": "turf centroid module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -27,7 +27,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -38,13 +38,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -55,14 +55,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -22,7 +22,7 @@ import { polygon, Units } from "@turf/helpers";
* //addToMap * //addToMap
* var addToMap = [turf.point(center), circle] * var addToMap = [turf.point(center), circle]
*/ */
function circle<P = GeoJsonProperties>( function circle<P extends GeoJsonProperties = GeoJsonProperties>(
center: number[] | Point | Feature<Point, P>, center: number[] | Point | Feature<Point, P>,
radius: number, radius: number,
options: { options: {

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/circle", "name": "@turf/circle",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf circle module", "description": "turf circle module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,31 +40,30 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@mapbox/geojsonhint": "*", "@mapbox/geojsonhint": "*",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/destination": "^7.0.0-alpha.0", "@turf/destination": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/clean-coords", "name": "@turf/clean-coords",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf clean-coords module", "description": "turf clean-coords module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,30 +40,29 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/clone", "name": "@turf/clone",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf clone module", "description": "turf clone module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,27 +39,26 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/clusters-dbscan", "name": "@turf/clusters-dbscan",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf clusters-dbscan module", "description": "turf clusters-dbscan module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -35,7 +35,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -46,18 +46,18 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/clusters": "^7.0.0-alpha.0", "@turf/clusters": "^7.0.0-alpha.2",
"@types/density-clustering": "^1.3.0", "@types/density-clustering": "^1.3.0",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
@ -66,16 +66,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clone": "^7.0.0-alpha.0", "@turf/clone": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"density-clustering": "1.3.0", "density-clustering": "1.3.0",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/clusters-kmeans", "name": "@turf/clusters-kmeans",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf clusters-kmeans module", "description": "turf clusters-kmeans module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -34,7 +34,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -45,19 +45,19 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/clusters": "^7.0.0-alpha.0", "@turf/clusters": "^7.0.0-alpha.2",
"@turf/random": "^7.0.0-alpha.0", "@turf/random": "^7.0.0-alpha.2",
"@types/skmeans": "^0.11.2", "@types/skmeans": "^0.11.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
@ -67,16 +67,15 @@
"matrix-to-grid": "*", "matrix-to-grid": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clone": "^7.0.0-alpha.0", "@turf/clone": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"skmeans": "0.9.7", "skmeans": "0.9.7",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -1,4 +1,9 @@
import { Feature, FeatureCollection, GeometryObject } from "geojson"; import {
Feature,
FeatureCollection,
GeoJsonProperties,
GeometryObject,
} from "geojson";
import { featureEach } from "@turf/meta"; import { featureEach } from "@turf/meta";
import { featureCollection } from "@turf/helpers"; import { featureCollection } from "@turf/helpers";
@ -31,10 +36,10 @@ import { featureCollection } from "@turf/helpers";
* turf.getCluster(clustered, {'marker-symbol': 'square'}).length; * turf.getCluster(clustered, {'marker-symbol': 'square'}).length;
* //= 1 * //= 1
*/ */
export function getCluster<G extends GeometryObject, P = any>( export function getCluster<
geojson: FeatureCollection<G, P>, G extends GeometryObject,
filter: any P extends GeoJsonProperties = GeoJsonProperties,
): FeatureCollection<G, P> { >(geojson: FeatureCollection<G, P>, filter: any): FeatureCollection<G, P> {
// Validation // Validation
if (!geojson) throw new Error("geojson is required"); if (!geojson) throw new Error("geojson is required");
if (geojson.type !== "FeatureCollection") if (geojson.type !== "FeatureCollection")
@ -99,7 +104,10 @@ export function getCluster<G extends GeometryObject, P = any>(
* values.push(clusterValue); * values.push(clusterValue);
* }); * });
*/ */
export function clusterEach<G extends GeometryObject, P = any>( export function clusterEach<
G extends GeometryObject,
P extends GeoJsonProperties = GeoJsonProperties,
>(
geojson: FeatureCollection<G, P>, geojson: FeatureCollection<G, P>,
property: number | string, property: number | string,
callback: ( callback: (
@ -193,7 +201,10 @@ export function clusterEach<G extends GeometryObject, P = any>(
* return previousValue.concat(clusterValue); * return previousValue.concat(clusterValue);
* }, []); * }, []);
*/ */
export function clusterReduce<G extends GeometryObject, P = any>( export function clusterReduce<
G extends GeometryObject,
P extends GeoJsonProperties = GeoJsonProperties,
>(
geojson: FeatureCollection<G, P>, geojson: FeatureCollection<G, P>,
property: number | string, property: number | string,
callback: ( callback: (

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/clusters", "name": "@turf/clusters",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf clusters module", "description": "turf clusters module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -31,7 +31,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -42,13 +42,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -56,13 +56,12 @@
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/collect", "name": "@turf/collect",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf collect module", "description": "turf collect module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -32,7 +32,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -43,13 +43,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/rbush": "^3.0.0", "@types/rbush": "^3.0.0",
@ -57,14 +57,13 @@
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", "@turf/boolean-point-in-polygon": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"rbush": "^3.0.1", "rbush": "^3.0.1",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/combine", "name": "@turf/combine",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf combine module", "description": "turf combine module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,26 +39,25 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/concave", "name": "@turf/concave",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf concave module", "description": "turf concave module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -38,7 +38,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -49,34 +49,33 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
"@types/topojson-client": "^3.0.0", "@types/topojson-client": "3.1.3",
"@types/topojson-server": "^3.0.0", "@types/topojson-server": "3.0.3",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clone": "^7.0.0-alpha.0", "@turf/clone": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@turf/tin": "^7.0.0-alpha.0", "@turf/tin": "^7.0.0-alpha.2",
"topojson-client": "3.x", "topojson-client": "3.x",
"topojson-server": "3.x", "topojson-server": "3.x",
"tslib": "^2.3.0" "tslib": "^2.3.0"

View File

@ -31,7 +31,7 @@ import concaveman from "concaveman";
* //addToMap * //addToMap
* var addToMap = [points, hull] * var addToMap = [points, hull]
*/ */
export default function convex<P = GeoJsonProperties>( export default function convex<P extends GeoJsonProperties = GeoJsonProperties>(
geojson: AllGeoJSON, geojson: AllGeoJSON,
options: { options: {
concavity?: number; concavity?: number;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/convex", "name": "@turf/convex",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf convex module", "description": "turf convex module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -25,7 +25,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -36,13 +36,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/concaveman": "^1.1.3", "@types/concaveman": "^1.1.3",
@ -52,14 +52,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"concaveman": "^1.2.1", "concaveman": "^1.2.1",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -37,7 +37,9 @@ import { getCoord } from "@turf/invariant";
* destination.properties['marker-color'] = '#f00'; * destination.properties['marker-color'] = '#f00';
* point.properties['marker-color'] = '#0f0'; * point.properties['marker-color'] = '#0f0';
*/ */
export default function destination<P = GeoJsonProperties>( export default function destination<
P extends GeoJsonProperties = GeoJsonProperties,
>(
origin: Coord, origin: Coord,
distance: number, distance: number,
bearing: number, bearing: number,

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/destination", "name": "@turf/destination",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf destination module", "description": "turf destination module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -29,7 +29,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -40,30 +40,29 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"glob": "*", "glob": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/difference", "name": "@turf/difference",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf difference module", "description": "turf difference module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -37,11 +37,11 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"benchmark": "*", "benchmark": "*",
@ -50,11 +50,12 @@
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"polygon-clipping": "^0.15.3" "polygon-clipping": "^0.15.3"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/directional-mean", "name": "@turf/directional-mean",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf directional-mean module", "description": "turf directional-mean module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,13 +39,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -53,19 +53,18 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bearing": "^7.0.0-alpha.0", "@turf/bearing": "^7.0.0-alpha.2",
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/destination": "^7.0.0-alpha.0", "@turf/destination": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/length": "^7.0.0-alpha.0", "@turf/length": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/dissolve", "name": "@turf/dissolve",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf dissolve module", "description": "turf dissolve module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -40,11 +40,11 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"benchmark": "*", "benchmark": "*",
@ -52,13 +52,14 @@
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/flatten": "^7.0.0-alpha.0", "@turf/flatten": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"polygon-clipping": "^0.15.3" "polygon-clipping": "^0.15.3"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/distance-weight", "name": "@turf/distance-weight",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf distance-weight module", "description": "turf distance-weight module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -28,7 +28,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -39,13 +39,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -53,16 +53,15 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/distance", "name": "@turf/distance",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf distance module", "description": "turf distance module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -27,7 +27,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -38,13 +38,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@types/tape": "*", "@types/tape": "*",
@ -52,14 +52,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/ellipse", "name": "@turf/ellipse",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf ellipse module", "description": "turf ellipse module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -40,30 +40,31 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"@mapbox/geojsonhint": "*", "@mapbox/geojsonhint": "*",
"@turf/bbox-polygon": "^7.0.0-alpha.0", "@turf/bbox-polygon": "^7.0.0-alpha.2",
"@turf/circle": "^7.0.0-alpha.0", "@turf/circle": "^7.0.0-alpha.2",
"@turf/destination": "^7.0.0-alpha.0", "@turf/destination": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"benchmark": "*", "benchmark": "*",
"glob": "*", "glob": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/rhumb-destination": "^7.0.0-alpha.0", "@turf/rhumb-destination": "^7.0.0-alpha.2",
"@turf/transform-rotate": "^7.0.0-alpha.0" "@turf/transform-rotate": "^7.0.0-alpha.2"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/envelope", "name": "@turf/envelope",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf envelope module", "description": "turf envelope module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -40,22 +40,23 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*" "tape": "*",
"tsx": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/bbox-polygon": "^7.0.0-alpha.0", "@turf/bbox-polygon": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0" "@turf/helpers": "^7.0.0-alpha.2"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/explode", "name": "@turf/explode",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf explode module", "description": "turf explode module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -39,11 +39,11 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js" "test:tape": "tsx test.js"
}, },
"devDependencies": { "devDependencies": {
"benchmark": "*", "benchmark": "*",
@ -52,10 +52,11 @@
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0" "@turf/meta": "^7.0.0-alpha.2"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/flatten", "name": "@turf/flatten",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf flatten module", "description": "turf flatten module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -44,11 +44,11 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -57,10 +57,11 @@
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0" "@turf/meta": "^7.0.0-alpha.2"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/flip", "name": "@turf/flip",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf flip module", "description": "turf flip module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -39,11 +39,11 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -52,11 +52,12 @@
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/clone": "^7.0.0-alpha.0", "@turf/clone": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0" "@turf/meta": "^7.0.0-alpha.2"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/great-circle", "name": "@turf/great-circle",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf great-circle module", "description": "turf great-circle module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -45,24 +45,25 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0" "@turf/invariant": "^7.0.0-alpha.2"
} }
} }

View File

@ -137,7 +137,7 @@ export const areaFactors: Record<AreaUnits, number> = {
*/ */
export function feature< export function feature<
G extends GeometryObject = Geometry, G extends GeometryObject = Geometry,
P = GeoJsonProperties P extends GeoJsonProperties = GeoJsonProperties,
>( >(
geom: G | null, geom: G | null,
properties?: P, properties?: P,
@ -214,7 +214,7 @@ export function geometry(
* *
* //=point * //=point
*/ */
export function point<P = GeoJsonProperties>( export function point<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position, coordinates: Position,
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -259,7 +259,7 @@ export function point<P = GeoJsonProperties>(
* *
* //=points * //=points
*/ */
export function points<P = GeoJsonProperties>( export function points<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[], coordinates: Position[],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -287,7 +287,7 @@ export function points<P = GeoJsonProperties>(
* *
* //=polygon * //=polygon
*/ */
export function polygon<P = GeoJsonProperties>( export function polygon<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[][], coordinates: Position[][],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -335,7 +335,7 @@ export function polygon<P = GeoJsonProperties>(
* *
* //=polygons * //=polygons
*/ */
export function polygons<P = GeoJsonProperties>( export function polygons<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[][][], coordinates: Position[][][],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -365,7 +365,7 @@ export function polygons<P = GeoJsonProperties>(
* //=linestring1 * //=linestring1
* //=linestring2 * //=linestring2
*/ */
export function lineString<P = GeoJsonProperties>( export function lineString<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[], coordinates: Position[],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -399,7 +399,7 @@ export function lineString<P = GeoJsonProperties>(
* *
* //=linestrings * //=linestrings
*/ */
export function lineStrings<P = GeoJsonProperties>( export function lineStrings<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[][], coordinates: Position[][],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -436,7 +436,7 @@ export function lineStrings<P = GeoJsonProperties>(
*/ */
export function featureCollection< export function featureCollection<
G extends GeometryObject = Geometry, G extends GeometryObject = Geometry,
P = GeoJsonProperties P extends GeoJsonProperties = GeoJsonProperties,
>( >(
features: Array<Feature<G, P>>, features: Array<Feature<G, P>>,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -469,7 +469,9 @@ export function featureCollection<
* *
* //=multiLine * //=multiLine
*/ */
export function multiLineString<P = GeoJsonProperties>( export function multiLineString<
P extends GeoJsonProperties = GeoJsonProperties,
>(
coordinates: Position[][], coordinates: Position[][],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -498,7 +500,7 @@ export function multiLineString<P = GeoJsonProperties>(
* *
* //=multiPt * //=multiPt
*/ */
export function multiPoint<P = GeoJsonProperties>( export function multiPoint<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[], coordinates: Position[],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -528,7 +530,7 @@ export function multiPoint<P = GeoJsonProperties>(
* //=multiPoly * //=multiPoly
* *
*/ */
export function multiPolygon<P = GeoJsonProperties>( export function multiPolygon<P extends GeoJsonProperties = GeoJsonProperties>(
coordinates: Position[][][], coordinates: Position[][][],
properties?: P, properties?: P,
options: { bbox?: BBox; id?: Id } = {} options: { bbox?: BBox; id?: Id } = {}
@ -558,7 +560,9 @@ export function multiPolygon<P = GeoJsonProperties>(
* *
* // => collection * // => collection
*/ */
export function geometryCollection<P = GeoJsonProperties>( export function geometryCollection<
P extends GeoJsonProperties = GeoJsonProperties,
>(
geometries: Array< geometries: Array<
Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon
>, >,

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/helpers", "name": "@turf/helpers",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf helpers module", "description": "turf helpers module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -33,7 +33,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -44,13 +44,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -58,8 +58,7 @@
"benchmark": "*", "benchmark": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*" "typescript": "*"
}, },
"dependencies": { "dependencies": {

View File

@ -642,7 +642,7 @@ test("turf-helpers -- isNumber", (t) => {
t.true(isNumber("123")); t.true(isNumber("123"));
t.true(isNumber(+"123")); t.true(isNumber(+"123"));
t.true(isNumber("1e10000")); t.true(isNumber("1e10000"));
t.true(isNumber(1e10000)); t.true(isNumber(1e100));
t.true(isNumber(Infinity)); t.true(isNumber(Infinity));
t.true(isNumber(-Infinity)); t.true(isNumber(-Infinity));

View File

@ -152,7 +152,7 @@ isNumber(-123);
isNumber("123"); isNumber("123");
isNumber(+"123"); isNumber(+"123");
isNumber("1e10000"); isNumber("1e10000");
isNumber(1e10000); isNumber(1e100);
isNumber(Infinity); isNumber(Infinity);
isNumber(-Infinity); isNumber(-Infinity);

View File

@ -1,6 +1,7 @@
const Benchmark = require("benchmark"); const Benchmark = require("benchmark");
const grid = require("./index").default; const grid = require("./index").default;
// prettier-ignore
var bbox = [ var bbox = [
-96.6357421875, -96.6357421875,
31.12819929911196, 31.12819929911196,

View File

@ -34,7 +34,7 @@ import { polygon, featureCollection, Units } from "@turf/helpers";
* //addToMap * //addToMap
* var addToMap = [hexgrid]; * var addToMap = [hexgrid];
*/ */
function hexGrid<P = GeoJsonProperties>( function hexGrid<P extends GeoJsonProperties = GeoJsonProperties>(
bbox: BBox, bbox: BBox,
cellSide: number, cellSide: number,
options: { options: {

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/hex-grid", "name": "@turf/hex-grid",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf hex-grid module", "description": "turf hex-grid module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -37,7 +37,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -48,33 +48,32 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/bbox-polygon": "^7.0.0-alpha.0", "@turf/bbox-polygon": "^7.0.0-alpha.2",
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"@types/tape": "*", "@types/tape": "*",
"benchmark": "*", "benchmark": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/intersect": "^7.0.0-alpha.0", "@turf/intersect": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }
} }

View File

@ -1,6 +1,7 @@
import { BBox } from "geojson"; import { BBox } from "geojson";
import hexGrid from "./index"; import hexGrid from "./index";
// prettier-ignore
const bbox: BBox = [ const bbox: BBox = [
-96.6357421875, -96.6357421875,
31.12819929911196, 31.12819929911196,

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/interpolate", "name": "@turf/interpolate",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf interpolate module", "description": "turf interpolate module",
"author": "Turf Authors", "author": "Turf Authors",
"contributors": [ "contributors": [
@ -41,34 +41,35 @@
"index.d.ts" "index.d.ts"
], ],
"scripts": { "scripts": {
"bench": "node -r esm bench.js", "bench": "tsx bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json", "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
"@turf/truncate": "^7.0.0-alpha.0", "@turf/truncate": "^7.0.0-alpha.2",
"benchmark": "*", "benchmark": "*",
"chromatism": "*", "chromatism": "*",
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"rollup": "*", "rollup": "*",
"tape": "*", "tape": "*",
"tsx": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/bbox": "^7.0.0-alpha.0", "@turf/bbox": "^7.0.0-alpha.2",
"@turf/centroid": "^7.0.0-alpha.0", "@turf/centroid": "^7.0.0-alpha.2",
"@turf/clone": "^7.0.0-alpha.0", "@turf/clone": "^7.0.0-alpha.2",
"@turf/distance": "^7.0.0-alpha.0", "@turf/distance": "^7.0.0-alpha.2",
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/hex-grid": "^7.0.0-alpha.0", "@turf/hex-grid": "^7.0.0-alpha.2",
"@turf/invariant": "^7.0.0-alpha.0", "@turf/invariant": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"@turf/point-grid": "^7.0.0-alpha.0", "@turf/point-grid": "^7.0.0-alpha.2",
"@turf/square-grid": "^7.0.0-alpha.0", "@turf/square-grid": "^7.0.0-alpha.2",
"@turf/triangle-grid": "^7.0.0-alpha.0" "@turf/triangle-grid": "^7.0.0-alpha.2"
} }
} }

View File

@ -44,7 +44,9 @@ import polygonClipping from "polygon-clipping";
* //addToMap * //addToMap
* var addToMap = [poly1, poly2, intersection]; * var addToMap = [poly1, poly2, intersection];
*/ */
export default function intersect<P = GeoJsonProperties>( export default function intersect<
P extends GeoJsonProperties = GeoJsonProperties,
>(
features: FeatureCollection<Polygon | MultiPolygon>, features: FeatureCollection<Polygon | MultiPolygon>,
options: { options: {
properties?: P; properties?: P;

View File

@ -1,6 +1,6 @@
{ {
"name": "@turf/intersect", "name": "@turf/intersect",
"version": "7.0.0-alpha.0", "version": "7.0.0-alpha.2",
"description": "turf intersect module", "description": "turf intersect module",
"author": "Turf Authors", "author": "Turf Authors",
"license": "MIT", "license": "MIT",
@ -26,7 +26,7 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts", "types": "./dist/js/index.d.ts",
"import": "./dist/es/index.js", "import": "./dist/es/index.js",
"require": "./dist/js/index.js" "require": "./dist/js/index.js"
} }
@ -37,13 +37,13 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"bench": "ts-node bench.js", "bench": "tsx bench.js",
"build": "npm-run-all build:*", "build": "npm-run-all --npm-path npm build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc", "build:js": "tsc",
"docs": "node ../../scripts/generate-readmes", "docs": "tsx ../../scripts/generate-readmes",
"test": "npm-run-all test:*", "test": "npm-run-all --npm-path npm test:*",
"test:tape": "ts-node -r esm test.js", "test:tape": "tsx test.js",
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
}, },
"devDependencies": { "devDependencies": {
@ -53,14 +53,13 @@
"load-json-file": "*", "load-json-file": "*",
"npm-run-all": "*", "npm-run-all": "*",
"tape": "*", "tape": "*",
"ts-node": "*", "tsx": "*",
"tslint": "*",
"typescript": "*", "typescript": "*",
"write-json-file": "*" "write-json-file": "*"
}, },
"dependencies": { "dependencies": {
"@turf/helpers": "^7.0.0-alpha.0", "@turf/helpers": "^7.0.0-alpha.2",
"@turf/meta": "^7.0.0-alpha.0", "@turf/meta": "^7.0.0-alpha.2",
"polygon-clipping": "^0.15.3", "polygon-clipping": "^0.15.3",
"tslib": "^2.3.0" "tslib": "^2.3.0"
} }

View File

@ -71,7 +71,7 @@ export function getCoords<
| Polygon | Polygon
| MultiPoint | MultiPoint
| MultiLineString | MultiLineString
| MultiPolygon | MultiPolygon,
>(coords: any[] | Feature<G> | G): any[] { >(coords: any[] | Feature<G> | G): any[] {
if (Array.isArray(coords)) { if (Array.isArray(coords)) {
return coords; return coords;

Some files were not shown because too many files have changed in this diff Show More