all these changes

This commit is contained in:
Jake Kasper
2026-04-09 13:19:47 -05:00
parent e83a51a051
commit 65315f36d1
39102 changed files with 7932979 additions and 567 deletions

20
frontend/node_modules/@turf/boolean-parallel/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 TurfJS
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

57
frontend/node_modules/@turf/boolean-parallel/README.md generated vendored Normal file
View File

@@ -0,0 +1,57 @@
# @turf/boolean-parallel
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## booleanParallel
Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2`
**Parameters**
- `line1` **([Geometry][1] \| [Feature][2]&lt;[LineString][3]>)** GeoJSON Feature or Geometry
- `line2` **([Geometry][1] \| [Feature][2]&lt;[LineString][3]>)** GeoJSON Feature or Geometry
**Examples**
```javascript
var line1 = turf.lineString([[0, 0], [0, 1]]);
var line2 = turf.lineString([[1, 0], [1, 1]]);
turf.booleanParallel(line1, line2);
//=true
```
Returns **[boolean][4]** true/false if the lines are parallel
[1]: https://tools.ietf.org/html/rfc7946#section-3.1
[2]: https://tools.ietf.org/html/rfc7946#section-3.2
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->
---
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
### Installation
Install this module individually:
```sh
$ npm install @turf/boolean-parallel
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

View File

@@ -0,0 +1,71 @@
import cleanCoords from "@turf/clean-coords";
import lineSegment from "@turf/line-segment";
import rhumbBearing from "@turf/rhumb-bearing";
import { bearingToAzimuth, } from "@turf/helpers";
/**
* Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2`
*
* @name booleanParallel
* @param {Geometry|Feature<LineString>} line1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<LineString>} line2 GeoJSON Feature or Geometry
* @returns {boolean} true/false if the lines are parallel
* @example
* var line1 = turf.lineString([[0, 0], [0, 1]]);
* var line2 = turf.lineString([[1, 0], [1, 1]]);
*
* turf.booleanParallel(line1, line2);
* //=true
*/
function booleanParallel(line1, line2) {
// validation
if (!line1)
throw new Error("line1 is required");
if (!line2)
throw new Error("line2 is required");
var type1 = getType(line1, "line1");
if (type1 !== "LineString")
throw new Error("line1 must be a LineString");
var type2 = getType(line2, "line2");
if (type2 !== "LineString")
throw new Error("line2 must be a LineString");
var segments1 = lineSegment(cleanCoords(line1)).features;
var segments2 = lineSegment(cleanCoords(line2)).features;
for (var i = 0; i < segments1.length; i++) {
var segment1 = segments1[i].geometry.coordinates;
if (!segments2[i])
break;
var segment2 = segments2[i].geometry.coordinates;
if (!isParallel(segment1, segment2))
return false;
}
return true;
}
/**
* Compares slopes and return result
*
* @private
* @param {Geometry|Feature<LineString>} segment1 Geometry or Feature
* @param {Geometry|Feature<LineString>} segment2 Geometry or Feature
* @returns {boolean} if slopes are equal
*/
function isParallel(segment1, segment2) {
var slope1 = bearingToAzimuth(rhumbBearing(segment1[0], segment1[1]));
var slope2 = bearingToAzimuth(rhumbBearing(segment2[0], segment2[1]));
return slope1 === slope2;
}
/**
* Returns Feature's type
*
* @private
* @param {Geometry|Feature<any>} geojson Geometry or Feature
* @param {string} name of the variable
* @returns {string} Feature's type
*/
function getType(geojson, name) {
if (geojson.geometry && geojson.geometry.type)
return geojson.geometry.type;
if (geojson.type)
return geojson.type; // if GeoJSON geometry
throw new Error("Invalid GeoJSON object for " + name);
}
export default booleanParallel;

View File

@@ -0,0 +1 @@
{"type":"module"}

View File

@@ -0,0 +1,17 @@
import { Feature, LineString } from "@turf/helpers";
/**
* Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2`
*
* @name booleanParallel
* @param {Geometry|Feature<LineString>} line1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<LineString>} line2 GeoJSON Feature or Geometry
* @returns {boolean} true/false if the lines are parallel
* @example
* var line1 = turf.lineString([[0, 0], [0, 1]]);
* var line2 = turf.lineString([[1, 0], [1, 1]]);
*
* turf.booleanParallel(line1, line2);
* //=true
*/
declare function booleanParallel(line1: Feature<LineString> | LineString, line2: Feature<LineString> | LineString): boolean;
export default booleanParallel;

View File

@@ -0,0 +1,76 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var clean_coords_1 = __importDefault(require("@turf/clean-coords"));
var line_segment_1 = __importDefault(require("@turf/line-segment"));
var rhumb_bearing_1 = __importDefault(require("@turf/rhumb-bearing"));
var helpers_1 = require("@turf/helpers");
/**
* Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2`
*
* @name booleanParallel
* @param {Geometry|Feature<LineString>} line1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<LineString>} line2 GeoJSON Feature or Geometry
* @returns {boolean} true/false if the lines are parallel
* @example
* var line1 = turf.lineString([[0, 0], [0, 1]]);
* var line2 = turf.lineString([[1, 0], [1, 1]]);
*
* turf.booleanParallel(line1, line2);
* //=true
*/
function booleanParallel(line1, line2) {
// validation
if (!line1)
throw new Error("line1 is required");
if (!line2)
throw new Error("line2 is required");
var type1 = getType(line1, "line1");
if (type1 !== "LineString")
throw new Error("line1 must be a LineString");
var type2 = getType(line2, "line2");
if (type2 !== "LineString")
throw new Error("line2 must be a LineString");
var segments1 = line_segment_1.default(clean_coords_1.default(line1)).features;
var segments2 = line_segment_1.default(clean_coords_1.default(line2)).features;
for (var i = 0; i < segments1.length; i++) {
var segment1 = segments1[i].geometry.coordinates;
if (!segments2[i])
break;
var segment2 = segments2[i].geometry.coordinates;
if (!isParallel(segment1, segment2))
return false;
}
return true;
}
/**
* Compares slopes and return result
*
* @private
* @param {Geometry|Feature<LineString>} segment1 Geometry or Feature
* @param {Geometry|Feature<LineString>} segment2 Geometry or Feature
* @returns {boolean} if slopes are equal
*/
function isParallel(segment1, segment2) {
var slope1 = helpers_1.bearingToAzimuth(rhumb_bearing_1.default(segment1[0], segment1[1]));
var slope2 = helpers_1.bearingToAzimuth(rhumb_bearing_1.default(segment2[0], segment2[1]));
return slope1 === slope2;
}
/**
* Returns Feature's type
*
* @private
* @param {Geometry|Feature<any>} geojson Geometry or Feature
* @param {string} name of the variable
* @returns {string} Feature's type
*/
function getType(geojson, name) {
if (geojson.geometry && geojson.geometry.type)
return geojson.geometry.type;
if (geojson.type)
return geojson.type; // if GeoJSON geometry
throw new Error("Invalid GeoJSON object for " + name);
}
exports.default = booleanParallel;

View File

@@ -0,0 +1,69 @@
{
"name": "@turf/boolean-parallel",
"version": "6.5.0",
"description": "turf boolean-parallel module",
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {
"type": "git",
"url": "git://github.com/Turfjs/turf.git"
},
"funding": "https://opencollective.com/turf",
"publishConfig": {
"access": "public"
},
"keywords": [
"turf",
"parallel",
"boolean",
"boolean-parallel"
],
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
"types": "dist/js/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js"
},
"devDependencies": {
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/clean-coords": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/line-segment": "^6.5.0",
"@turf/rhumb-bearing": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}