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-disjoint/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.

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

@@ -0,0 +1,60 @@
# @turf/boolean-disjoint
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## booleanDisjoint
Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.
**Parameters**
- `feature1` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
- `feature2` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
**Examples**
```javascript
var point = turf.point([2, 2]);
var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
turf.booleanDisjoint(line, point);
//=true
```
Returns **[boolean][3]** true/false
[1]: https://tools.ietf.org/html/rfc7946#section-3.1
[2]: https://tools.ietf.org/html/rfc7946#section-3.2
[3]: 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-disjoint
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```
### Diagrams
![esri-disjoint](diagrams/esri-disjoint.gif)

168
frontend/node_modules/@turf/boolean-disjoint/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,168 @@
import booleanPointInPolygon from "@turf/boolean-point-in-polygon";
import lineIntersect from "@turf/line-intersect";
import { flattenEach } from "@turf/meta";
import polygonToLine from "@turf/polygon-to-line";
/**
* Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.
*
* @name booleanDisjoint
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var point = turf.point([2, 2]);
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
*
* turf.booleanDisjoint(line, point);
* //=true
*/
function booleanDisjoint(feature1, feature2) {
var bool = true;
flattenEach(feature1, function (flatten1) {
flattenEach(feature2, function (flatten2) {
if (bool === false) {
return false;
}
bool = disjoint(flatten1.geometry, flatten2.geometry);
});
});
return bool;
}
/**
* Disjoint operation for simple Geometries (Point/LineString/Polygon)
*
* @private
* @param {Geometry<any>} geom1 GeoJSON Geometry
* @param {Geometry<any>} geom2 GeoJSON Geometry
* @returns {boolean} true/false
*/
function disjoint(geom1, geom2) {
switch (geom1.type) {
case "Point":
switch (geom2.type) {
case "Point":
return !compareCoords(geom1.coordinates, geom2.coordinates);
case "LineString":
return !isPointOnLine(geom2, geom1);
case "Polygon":
return !booleanPointInPolygon(geom1, geom2);
}
/* istanbul ignore next */
break;
case "LineString":
switch (geom2.type) {
case "Point":
return !isPointOnLine(geom1, geom2);
case "LineString":
return !isLineOnLine(geom1, geom2);
case "Polygon":
return !isLineInPoly(geom2, geom1);
}
/* istanbul ignore next */
break;
case "Polygon":
switch (geom2.type) {
case "Point":
return !booleanPointInPolygon(geom2, geom1);
case "LineString":
return !isLineInPoly(geom1, geom2);
case "Polygon":
return !isPolyInPoly(geom2, geom1);
}
}
return false;
}
// http://stackoverflow.com/a/11908158/1979085
function isPointOnLine(lineString, pt) {
for (var i = 0; i < lineString.coordinates.length - 1; i++) {
if (isPointOnLineSegment(lineString.coordinates[i], lineString.coordinates[i + 1], pt.coordinates)) {
return true;
}
}
return false;
}
function isLineOnLine(lineString1, lineString2) {
var doLinesIntersect = lineIntersect(lineString1, lineString2);
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
function isLineInPoly(polygon, lineString) {
for (var _i = 0, _a = lineString.coordinates; _i < _a.length; _i++) {
var coord = _a[_i];
if (booleanPointInPolygon(coord, polygon)) {
return true;
}
}
var doLinesIntersect = lineIntersect(lineString, polygonToLine(polygon));
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
/**
* Is Polygon (geom1) in Polygon (geom2)
* Only takes into account outer rings
* See http://stackoverflow.com/a/4833823/1979085
*
* @private
* @param {Geometry|Feature<Polygon>} feature1 Polygon1
* @param {Geometry|Feature<Polygon>} feature2 Polygon2
* @returns {boolean} true/false
*/
function isPolyInPoly(feature1, feature2) {
for (var _i = 0, _a = feature1.coordinates[0]; _i < _a.length; _i++) {
var coord1 = _a[_i];
if (booleanPointInPolygon(coord1, feature2)) {
return true;
}
}
for (var _b = 0, _c = feature2.coordinates[0]; _b < _c.length; _b++) {
var coord2 = _c[_b];
if (booleanPointInPolygon(coord2, feature1)) {
return true;
}
}
var doLinesIntersect = lineIntersect(polygonToLine(feature1), polygonToLine(feature2));
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
var dxc = pt[0] - lineSegmentStart[0];
var dyc = pt[1] - lineSegmentStart[1];
var dxl = lineSegmentEnd[0] - lineSegmentStart[0];
var dyl = lineSegmentEnd[1] - lineSegmentStart[1];
var cross = dxc * dyl - dyc * dxl;
if (cross !== 0) {
return false;
}
if (Math.abs(dxl) >= Math.abs(dyl)) {
if (dxl > 0) {
return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];
}
else {
return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];
}
}
else if (dyl > 0) {
return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];
}
else {
return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];
}
}
/**
* compareCoords
*
* @private
* @param {Position} pair1 point [x,y]
* @param {Position} pair2 point [x,y]
* @returns {boolean} true/false if coord pairs match
*/
function compareCoords(pair1, pair2) {
return pair1[0] === pair2[0] && pair1[1] === pair2[1];
}
export default booleanDisjoint;

View File

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

View File

@@ -0,0 +1,17 @@
import { Feature, Geometry } from "@turf/helpers";
/**
* Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.
*
* @name booleanDisjoint
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var point = turf.point([2, 2]);
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
*
* turf.booleanDisjoint(line, point);
* //=true
*/
declare function booleanDisjoint(feature1: Feature<any> | Geometry, feature2: Feature<any> | Geometry): boolean;
export default booleanDisjoint;

173
frontend/node_modules/@turf/boolean-disjoint/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,173 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var boolean_point_in_polygon_1 = __importDefault(require("@turf/boolean-point-in-polygon"));
var line_intersect_1 = __importDefault(require("@turf/line-intersect"));
var meta_1 = require("@turf/meta");
var polygon_to_line_1 = __importDefault(require("@turf/polygon-to-line"));
/**
* Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.
*
* @name booleanDisjoint
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var point = turf.point([2, 2]);
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
*
* turf.booleanDisjoint(line, point);
* //=true
*/
function booleanDisjoint(feature1, feature2) {
var bool = true;
meta_1.flattenEach(feature1, function (flatten1) {
meta_1.flattenEach(feature2, function (flatten2) {
if (bool === false) {
return false;
}
bool = disjoint(flatten1.geometry, flatten2.geometry);
});
});
return bool;
}
/**
* Disjoint operation for simple Geometries (Point/LineString/Polygon)
*
* @private
* @param {Geometry<any>} geom1 GeoJSON Geometry
* @param {Geometry<any>} geom2 GeoJSON Geometry
* @returns {boolean} true/false
*/
function disjoint(geom1, geom2) {
switch (geom1.type) {
case "Point":
switch (geom2.type) {
case "Point":
return !compareCoords(geom1.coordinates, geom2.coordinates);
case "LineString":
return !isPointOnLine(geom2, geom1);
case "Polygon":
return !boolean_point_in_polygon_1.default(geom1, geom2);
}
/* istanbul ignore next */
break;
case "LineString":
switch (geom2.type) {
case "Point":
return !isPointOnLine(geom1, geom2);
case "LineString":
return !isLineOnLine(geom1, geom2);
case "Polygon":
return !isLineInPoly(geom2, geom1);
}
/* istanbul ignore next */
break;
case "Polygon":
switch (geom2.type) {
case "Point":
return !boolean_point_in_polygon_1.default(geom2, geom1);
case "LineString":
return !isLineInPoly(geom1, geom2);
case "Polygon":
return !isPolyInPoly(geom2, geom1);
}
}
return false;
}
// http://stackoverflow.com/a/11908158/1979085
function isPointOnLine(lineString, pt) {
for (var i = 0; i < lineString.coordinates.length - 1; i++) {
if (isPointOnLineSegment(lineString.coordinates[i], lineString.coordinates[i + 1], pt.coordinates)) {
return true;
}
}
return false;
}
function isLineOnLine(lineString1, lineString2) {
var doLinesIntersect = line_intersect_1.default(lineString1, lineString2);
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
function isLineInPoly(polygon, lineString) {
for (var _i = 0, _a = lineString.coordinates; _i < _a.length; _i++) {
var coord = _a[_i];
if (boolean_point_in_polygon_1.default(coord, polygon)) {
return true;
}
}
var doLinesIntersect = line_intersect_1.default(lineString, polygon_to_line_1.default(polygon));
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
/**
* Is Polygon (geom1) in Polygon (geom2)
* Only takes into account outer rings
* See http://stackoverflow.com/a/4833823/1979085
*
* @private
* @param {Geometry|Feature<Polygon>} feature1 Polygon1
* @param {Geometry|Feature<Polygon>} feature2 Polygon2
* @returns {boolean} true/false
*/
function isPolyInPoly(feature1, feature2) {
for (var _i = 0, _a = feature1.coordinates[0]; _i < _a.length; _i++) {
var coord1 = _a[_i];
if (boolean_point_in_polygon_1.default(coord1, feature2)) {
return true;
}
}
for (var _b = 0, _c = feature2.coordinates[0]; _b < _c.length; _b++) {
var coord2 = _c[_b];
if (boolean_point_in_polygon_1.default(coord2, feature1)) {
return true;
}
}
var doLinesIntersect = line_intersect_1.default(polygon_to_line_1.default(feature1), polygon_to_line_1.default(feature2));
if (doLinesIntersect.features.length > 0) {
return true;
}
return false;
}
function isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt) {
var dxc = pt[0] - lineSegmentStart[0];
var dyc = pt[1] - lineSegmentStart[1];
var dxl = lineSegmentEnd[0] - lineSegmentStart[0];
var dyl = lineSegmentEnd[1] - lineSegmentStart[1];
var cross = dxc * dyl - dyc * dxl;
if (cross !== 0) {
return false;
}
if (Math.abs(dxl) >= Math.abs(dyl)) {
if (dxl > 0) {
return lineSegmentStart[0] <= pt[0] && pt[0] <= lineSegmentEnd[0];
}
else {
return lineSegmentEnd[0] <= pt[0] && pt[0] <= lineSegmentStart[0];
}
}
else if (dyl > 0) {
return lineSegmentStart[1] <= pt[1] && pt[1] <= lineSegmentEnd[1];
}
else {
return lineSegmentEnd[1] <= pt[1] && pt[1] <= lineSegmentStart[1];
}
}
/**
* compareCoords
*
* @private
* @param {Position} pair1 point [x,y]
* @param {Position} pair2 point [x,y]
* @returns {boolean} true/false if coord pairs match
*/
function compareCoords(pair1, pair2) {
return pair1[0] === pair2[0] && pair1[1] === pair2[1];
}
exports.default = booleanDisjoint;

View File

@@ -0,0 +1,71 @@
{
"name": "@turf/boolean-disjoint",
"version": "6.5.0",
"description": "turf boolean-disjoint module",
"author": "Turf Authors",
"contributors": [
"Rowan Winsemius <@rowanwins>",
"Denis Carriere <@DenisCarriere>"
],
"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",
"disjoint",
"boolean",
"de-9im"
],
"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": "*",
"boolean-shapely": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*"
},
"dependencies": {
"@turf/boolean-point-in-polygon": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/line-intersect": "^6.5.0",
"@turf/meta": "^6.5.0",
"@turf/polygon-to-line": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}