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

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

@@ -0,0 +1,58 @@
# @turf/boolean-within
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## booleanWithin
Boolean-within returns true if the first geometry is completely within the second geometry.
The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)
must not intersect the exterior of the secondary (geometry b).
Boolean-within returns the exact opposite result of the `@turf/boolean-contains`.
**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 line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
var point = turf.point([1, 2]);
turf.booleanWithin(point, line);
//=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-within
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,215 @@
import calcBbox from "@turf/bbox";
import booleanPointOnLine from "@turf/boolean-point-on-line";
import booleanPointInPolygon from "@turf/boolean-point-in-polygon";
import { getGeom } from "@turf/invariant";
/**
* Boolean-within returns true if the first geometry is completely within the second geometry.
* The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)
* must not intersect the exterior of the secondary (geometry b).
* Boolean-within returns the exact opposite result of the `@turf/boolean-contains`.
*
* @name booleanWithin
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
* var point = turf.point([1, 2]);
*
* turf.booleanWithin(point, line);
* //=true
*/
function booleanWithin(feature1, feature2) {
var geom1 = getGeom(feature1);
var geom2 = getGeom(feature2);
var type1 = geom1.type;
var type2 = geom2.type;
switch (type1) {
case "Point":
switch (type2) {
case "MultiPoint":
return isPointInMultiPoint(geom1, geom2);
case "LineString":
return booleanPointOnLine(geom1, geom2, { ignoreEndVertices: true });
case "Polygon":
case "MultiPolygon":
return booleanPointInPolygon(geom1, geom2, { ignoreBoundary: true });
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "MultiPoint":
switch (type2) {
case "MultiPoint":
return isMultiPointInMultiPoint(geom1, geom2);
case "LineString":
return isMultiPointOnLine(geom1, geom2);
case "Polygon":
case "MultiPolygon":
return isMultiPointInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "LineString":
switch (type2) {
case "LineString":
return isLineOnLine(geom1, geom2);
case "Polygon":
case "MultiPolygon":
return isLineInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "Polygon":
switch (type2) {
case "Polygon":
case "MultiPolygon":
return isPolyInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
default:
throw new Error("feature1 " + type1 + " geometry not supported");
}
}
function isPointInMultiPoint(point, multiPoint) {
var i;
var output = false;
for (i = 0; i < multiPoint.coordinates.length; i++) {
if (compareCoords(multiPoint.coordinates[i], point.coordinates)) {
output = true;
break;
}
}
return output;
}
function isMultiPointInMultiPoint(multiPoint1, multiPoint2) {
for (var i = 0; i < multiPoint1.coordinates.length; i++) {
var anyMatch = false;
for (var i2 = 0; i2 < multiPoint2.coordinates.length; i2++) {
if (compareCoords(multiPoint1.coordinates[i], multiPoint2.coordinates[i2])) {
anyMatch = true;
}
}
if (!anyMatch) {
return false;
}
}
return true;
}
function isMultiPointOnLine(multiPoint, lineString) {
var foundInsidePoint = false;
for (var i = 0; i < multiPoint.coordinates.length; i++) {
if (!booleanPointOnLine(multiPoint.coordinates[i], lineString)) {
return false;
}
if (!foundInsidePoint) {
foundInsidePoint = booleanPointOnLine(multiPoint.coordinates[i], lineString, { ignoreEndVertices: true });
}
}
return foundInsidePoint;
}
function isMultiPointInPoly(multiPoint, polygon) {
var output = true;
var oneInside = false;
var isInside = false;
for (var i = 0; i < multiPoint.coordinates.length; i++) {
isInside = booleanPointInPolygon(multiPoint.coordinates[1], polygon);
if (!isInside) {
output = false;
break;
}
if (!oneInside) {
isInside = booleanPointInPolygon(multiPoint.coordinates[1], polygon, {
ignoreBoundary: true,
});
}
}
return output && isInside;
}
function isLineOnLine(lineString1, lineString2) {
for (var i = 0; i < lineString1.coordinates.length; i++) {
if (!booleanPointOnLine(lineString1.coordinates[i], lineString2)) {
return false;
}
}
return true;
}
function isLineInPoly(linestring, polygon) {
var polyBbox = calcBbox(polygon);
var lineBbox = calcBbox(linestring);
if (!doBBoxOverlap(polyBbox, lineBbox)) {
return false;
}
var foundInsidePoint = false;
for (var i = 0; i < linestring.coordinates.length - 1; i++) {
if (!booleanPointInPolygon(linestring.coordinates[i], polygon)) {
return false;
}
if (!foundInsidePoint) {
foundInsidePoint = booleanPointInPolygon(linestring.coordinates[i], polygon, { ignoreBoundary: true });
}
if (!foundInsidePoint) {
var midpoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]);
foundInsidePoint = booleanPointInPolygon(midpoint, polygon, {
ignoreBoundary: true,
});
}
}
return foundInsidePoint;
}
/**
* Is Polygon2 in Polygon1
* Only takes into account outer rings
*
* @private
* @param {Polygon} geometry1
* @param {Polygon|MultiPolygon} geometry2
* @returns {boolean} true/false
*/
function isPolyInPoly(geometry1, geometry2) {
var poly1Bbox = calcBbox(geometry1);
var poly2Bbox = calcBbox(geometry2);
if (!doBBoxOverlap(poly2Bbox, poly1Bbox)) {
return false;
}
for (var i = 0; i < geometry1.coordinates[0].length; i++) {
if (!booleanPointInPolygon(geometry1.coordinates[0][i], geometry2)) {
return false;
}
}
return true;
}
function doBBoxOverlap(bbox1, bbox2) {
if (bbox1[0] > bbox2[0])
return false;
if (bbox1[2] < bbox2[2])
return false;
if (bbox1[1] > bbox2[1])
return false;
if (bbox1[3] < bbox2[3])
return false;
return true;
}
/**
* 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];
}
/**
* getMidpoint
*
* @private
* @param {Position} pair1 point [x,y]
* @param {Position} pair2 point [x,y]
* @returns {Position} midpoint of pair1 and pair2
*/
function getMidpoint(pair1, pair2) {
return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
}
export default booleanWithin;

View File

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

View File

@@ -0,0 +1,20 @@
import { Feature, Geometry } from "@turf/helpers";
/**
* Boolean-within returns true if the first geometry is completely within the second geometry.
* The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)
* must not intersect the exterior of the secondary (geometry b).
* Boolean-within returns the exact opposite result of the `@turf/boolean-contains`.
*
* @name booleanWithin
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
* var point = turf.point([1, 2]);
*
* turf.booleanWithin(point, line);
* //=true
*/
declare function booleanWithin(feature1: Feature<any> | Geometry, feature2: Feature<any> | Geometry): boolean;
export default booleanWithin;

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

@@ -0,0 +1,220 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var bbox_1 = __importDefault(require("@turf/bbox"));
var boolean_point_on_line_1 = __importDefault(require("@turf/boolean-point-on-line"));
var boolean_point_in_polygon_1 = __importDefault(require("@turf/boolean-point-in-polygon"));
var invariant_1 = require("@turf/invariant");
/**
* Boolean-within returns true if the first geometry is completely within the second geometry.
* The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)
* must not intersect the exterior of the secondary (geometry b).
* Boolean-within returns the exact opposite result of the `@turf/boolean-contains`.
*
* @name booleanWithin
* @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
* @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
* @returns {boolean} true/false
* @example
* var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
* var point = turf.point([1, 2]);
*
* turf.booleanWithin(point, line);
* //=true
*/
function booleanWithin(feature1, feature2) {
var geom1 = invariant_1.getGeom(feature1);
var geom2 = invariant_1.getGeom(feature2);
var type1 = geom1.type;
var type2 = geom2.type;
switch (type1) {
case "Point":
switch (type2) {
case "MultiPoint":
return isPointInMultiPoint(geom1, geom2);
case "LineString":
return boolean_point_on_line_1.default(geom1, geom2, { ignoreEndVertices: true });
case "Polygon":
case "MultiPolygon":
return boolean_point_in_polygon_1.default(geom1, geom2, { ignoreBoundary: true });
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "MultiPoint":
switch (type2) {
case "MultiPoint":
return isMultiPointInMultiPoint(geom1, geom2);
case "LineString":
return isMultiPointOnLine(geom1, geom2);
case "Polygon":
case "MultiPolygon":
return isMultiPointInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "LineString":
switch (type2) {
case "LineString":
return isLineOnLine(geom1, geom2);
case "Polygon":
case "MultiPolygon":
return isLineInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
case "Polygon":
switch (type2) {
case "Polygon":
case "MultiPolygon":
return isPolyInPoly(geom1, geom2);
default:
throw new Error("feature2 " + type2 + " geometry not supported");
}
default:
throw new Error("feature1 " + type1 + " geometry not supported");
}
}
function isPointInMultiPoint(point, multiPoint) {
var i;
var output = false;
for (i = 0; i < multiPoint.coordinates.length; i++) {
if (compareCoords(multiPoint.coordinates[i], point.coordinates)) {
output = true;
break;
}
}
return output;
}
function isMultiPointInMultiPoint(multiPoint1, multiPoint2) {
for (var i = 0; i < multiPoint1.coordinates.length; i++) {
var anyMatch = false;
for (var i2 = 0; i2 < multiPoint2.coordinates.length; i2++) {
if (compareCoords(multiPoint1.coordinates[i], multiPoint2.coordinates[i2])) {
anyMatch = true;
}
}
if (!anyMatch) {
return false;
}
}
return true;
}
function isMultiPointOnLine(multiPoint, lineString) {
var foundInsidePoint = false;
for (var i = 0; i < multiPoint.coordinates.length; i++) {
if (!boolean_point_on_line_1.default(multiPoint.coordinates[i], lineString)) {
return false;
}
if (!foundInsidePoint) {
foundInsidePoint = boolean_point_on_line_1.default(multiPoint.coordinates[i], lineString, { ignoreEndVertices: true });
}
}
return foundInsidePoint;
}
function isMultiPointInPoly(multiPoint, polygon) {
var output = true;
var oneInside = false;
var isInside = false;
for (var i = 0; i < multiPoint.coordinates.length; i++) {
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon);
if (!isInside) {
output = false;
break;
}
if (!oneInside) {
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon, {
ignoreBoundary: true,
});
}
}
return output && isInside;
}
function isLineOnLine(lineString1, lineString2) {
for (var i = 0; i < lineString1.coordinates.length; i++) {
if (!boolean_point_on_line_1.default(lineString1.coordinates[i], lineString2)) {
return false;
}
}
return true;
}
function isLineInPoly(linestring, polygon) {
var polyBbox = bbox_1.default(polygon);
var lineBbox = bbox_1.default(linestring);
if (!doBBoxOverlap(polyBbox, lineBbox)) {
return false;
}
var foundInsidePoint = false;
for (var i = 0; i < linestring.coordinates.length - 1; i++) {
if (!boolean_point_in_polygon_1.default(linestring.coordinates[i], polygon)) {
return false;
}
if (!foundInsidePoint) {
foundInsidePoint = boolean_point_in_polygon_1.default(linestring.coordinates[i], polygon, { ignoreBoundary: true });
}
if (!foundInsidePoint) {
var midpoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]);
foundInsidePoint = boolean_point_in_polygon_1.default(midpoint, polygon, {
ignoreBoundary: true,
});
}
}
return foundInsidePoint;
}
/**
* Is Polygon2 in Polygon1
* Only takes into account outer rings
*
* @private
* @param {Polygon} geometry1
* @param {Polygon|MultiPolygon} geometry2
* @returns {boolean} true/false
*/
function isPolyInPoly(geometry1, geometry2) {
var poly1Bbox = bbox_1.default(geometry1);
var poly2Bbox = bbox_1.default(geometry2);
if (!doBBoxOverlap(poly2Bbox, poly1Bbox)) {
return false;
}
for (var i = 0; i < geometry1.coordinates[0].length; i++) {
if (!boolean_point_in_polygon_1.default(geometry1.coordinates[0][i], geometry2)) {
return false;
}
}
return true;
}
function doBBoxOverlap(bbox1, bbox2) {
if (bbox1[0] > bbox2[0])
return false;
if (bbox1[2] < bbox2[2])
return false;
if (bbox1[1] > bbox2[1])
return false;
if (bbox1[3] < bbox2[3])
return false;
return true;
}
/**
* 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];
}
/**
* getMidpoint
*
* @private
* @param {Position} pair1 point [x,y]
* @param {Position} pair2 point [x,y]
* @returns {Position} midpoint of pair1 and pair2
*/
function getMidpoint(pair1, pair2) {
return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];
}
exports.default = booleanWithin;

View File

@@ -0,0 +1,75 @@
{
"name": "@turf/boolean-within",
"version": "6.5.0",
"description": "turf boolean-within module",
"author": "Turf Authors",
"contributors": [
"Rowan Winsemius <@rowanwins>"
],
"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",
"gis",
"boolean",
"de-9im",
"within",
"boolean-within"
],
"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",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"@types/tape": "*",
"benchmark": "*",
"boolean-jsts": "*",
"boolean-shapely": "*",
"glob": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*"
},
"dependencies": {
"@turf/bbox": "^6.5.0",
"@turf/boolean-point-in-polygon": "^6.5.0",
"@turf/boolean-point-on-line": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}