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/triangle-grid/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.

72
frontend/node_modules/@turf/triangle-grid/README.md generated vendored Normal file
View File

@@ -0,0 +1,72 @@
# @turf/triangle-grid
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## triangleGrid
Takes a bounding box and a cell depth and returns a set of triangular [polygons][1] in a grid.
**Parameters**
- `bbox` **[Array][2]&lt;[number][3]>** extent in [minX, minY, maxX, maxY] order
- `cellSide` **[number][3]** dimension of each cell
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.units` **[string][5]** used in calculating cellSide, can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
- `options.mask` **[Feature][6]&lt;[Polygon][7]>?** if passed a Polygon or MultiPolygon, the grid Points will be created only inside it
- `options.properties` **[Object][4]** passed to each point of the grid (optional, default `{}`)
**Examples**
```javascript
var bbox = [-95, 30 ,-85, 40];
var cellSide = 50;
var options = {units: 'miles'};
var triangleGrid = turf.triangleGrid(bbox, cellSide, options);
//addToMap
var addToMap = [triangleGrid];
```
Returns **[FeatureCollection][8]&lt;[Polygon][7]>** grid of polygons
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[6]: https://tools.ietf.org/html/rfc7946#section-3.2
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[8]: https://tools.ietf.org/html/rfc7946#section-3.3
<!-- 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/triangle-grid
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

139
frontend/node_modules/@turf/triangle-grid/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,139 @@
import distance from "@turf/distance";
import intersect from "@turf/intersect";
import { polygon, featureCollection, } from "@turf/helpers";
/**
* Takes a bounding box and a cell depth and returns a set of triangular {@link Polygon|polygons} in a grid.
*
* @name triangleGrid
* @param {Array<number>} bbox extent in [minX, minY, maxX, maxY] order
* @param {number} cellSide dimension of each cell
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] used in calculating cellSide, can be degrees, radians, miles, or kilometers
* @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it
* @param {Object} [options.properties={}] passed to each point of the grid
* @returns {FeatureCollection<Polygon>} grid of polygons
* @example
* var bbox = [-95, 30 ,-85, 40];
* var cellSide = 50;
* var options = {units: 'miles'};
*
* var triangleGrid = turf.triangleGrid(bbox, cellSide, options);
*
* //addToMap
* var addToMap = [triangleGrid];
*/
function triangleGrid(bbox, cellSide, options) {
if (options === void 0) { options = {}; }
// Containers
var results = [];
// Input Validation is being handled by Typescript
// if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');
// if (!isNumber(cellSide)) throw new Error('cellSide is invalid');
// if (!bbox) throw new Error('bbox is required');
// if (!Array.isArray(bbox)) throw new Error('bbox must be array');
// if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');
// if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');
// Main
var xFraction = cellSide / distance([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);
var cellWidth = xFraction * (bbox[2] - bbox[0]);
var yFraction = cellSide / distance([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);
var cellHeight = yFraction * (bbox[3] - bbox[1]);
var xi = 0;
var currentX = bbox[0];
while (currentX <= bbox[2]) {
var yi = 0;
var currentY = bbox[1];
while (currentY <= bbox[3]) {
var cellTriangle1 = null;
var cellTriangle2 = null;
if (xi % 2 === 0 && yi % 2 === 0) {
cellTriangle1 = polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = polygon([
[
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY + cellHeight],
],
], options.properties);
}
else if (xi % 2 === 0 && yi % 2 === 1) {
cellTriangle1 = polygon([
[
[currentX, currentY],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX, currentY],
],
], options.properties);
}
else if (yi % 2 === 0 && xi % 2 === 1) {
cellTriangle1 = polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = polygon([
[
[currentX, currentY],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
}
else if (yi % 2 === 1 && xi % 2 === 1) {
cellTriangle1 = polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = polygon([
[
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY + cellHeight],
],
], options.properties);
}
if (options.mask) {
if (intersect(options.mask, cellTriangle1))
results.push(cellTriangle1);
if (intersect(options.mask, cellTriangle2))
results.push(cellTriangle2);
}
else {
results.push(cellTriangle1);
results.push(cellTriangle2);
}
currentY += cellHeight;
yi++;
}
xi++;
currentX += cellWidth;
}
return featureCollection(results);
}
export default triangleGrid;

View File

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

28
frontend/node_modules/@turf/triangle-grid/dist/js/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,28 @@
import { Units, BBox, Feature, Polygon, FeatureCollection, Properties } from "@turf/helpers";
/**
* Takes a bounding box and a cell depth and returns a set of triangular {@link Polygon|polygons} in a grid.
*
* @name triangleGrid
* @param {Array<number>} bbox extent in [minX, minY, maxX, maxY] order
* @param {number} cellSide dimension of each cell
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] used in calculating cellSide, can be degrees, radians, miles, or kilometers
* @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it
* @param {Object} [options.properties={}] passed to each point of the grid
* @returns {FeatureCollection<Polygon>} grid of polygons
* @example
* var bbox = [-95, 30 ,-85, 40];
* var cellSide = 50;
* var options = {units: 'miles'};
*
* var triangleGrid = turf.triangleGrid(bbox, cellSide, options);
*
* //addToMap
* var addToMap = [triangleGrid];
*/
declare function triangleGrid<P = Properties>(bbox: BBox, cellSide: number, options?: {
units?: Units;
properties?: P;
mask?: Feature<Polygon> | Polygon;
}): FeatureCollection<Polygon, P>;
export default triangleGrid;

144
frontend/node_modules/@turf/triangle-grid/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,144 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var distance_1 = __importDefault(require("@turf/distance"));
var intersect_1 = __importDefault(require("@turf/intersect"));
var helpers_1 = require("@turf/helpers");
/**
* Takes a bounding box and a cell depth and returns a set of triangular {@link Polygon|polygons} in a grid.
*
* @name triangleGrid
* @param {Array<number>} bbox extent in [minX, minY, maxX, maxY] order
* @param {number} cellSide dimension of each cell
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] used in calculating cellSide, can be degrees, radians, miles, or kilometers
* @param {Feature<Polygon>} [options.mask] if passed a Polygon or MultiPolygon, the grid Points will be created only inside it
* @param {Object} [options.properties={}] passed to each point of the grid
* @returns {FeatureCollection<Polygon>} grid of polygons
* @example
* var bbox = [-95, 30 ,-85, 40];
* var cellSide = 50;
* var options = {units: 'miles'};
*
* var triangleGrid = turf.triangleGrid(bbox, cellSide, options);
*
* //addToMap
* var addToMap = [triangleGrid];
*/
function triangleGrid(bbox, cellSide, options) {
if (options === void 0) { options = {}; }
// Containers
var results = [];
// Input Validation is being handled by Typescript
// if (cellSide === null || cellSide === undefined) throw new Error('cellSide is required');
// if (!isNumber(cellSide)) throw new Error('cellSide is invalid');
// if (!bbox) throw new Error('bbox is required');
// if (!Array.isArray(bbox)) throw new Error('bbox must be array');
// if (bbox.length !== 4) throw new Error('bbox must contain 4 numbers');
// if (mask && ['Polygon', 'MultiPolygon'].indexOf(getType(mask)) === -1) throw new Error('options.mask must be a (Multi)Polygon');
// Main
var xFraction = cellSide / distance_1.default([bbox[0], bbox[1]], [bbox[2], bbox[1]], options);
var cellWidth = xFraction * (bbox[2] - bbox[0]);
var yFraction = cellSide / distance_1.default([bbox[0], bbox[1]], [bbox[0], bbox[3]], options);
var cellHeight = yFraction * (bbox[3] - bbox[1]);
var xi = 0;
var currentX = bbox[0];
while (currentX <= bbox[2]) {
var yi = 0;
var currentY = bbox[1];
while (currentY <= bbox[3]) {
var cellTriangle1 = null;
var cellTriangle2 = null;
if (xi % 2 === 0 && yi % 2 === 0) {
cellTriangle1 = helpers_1.polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = helpers_1.polygon([
[
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY + cellHeight],
],
], options.properties);
}
else if (xi % 2 === 0 && yi % 2 === 1) {
cellTriangle1 = helpers_1.polygon([
[
[currentX, currentY],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = helpers_1.polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX, currentY],
],
], options.properties);
}
else if (yi % 2 === 0 && xi % 2 === 1) {
cellTriangle1 = helpers_1.polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = helpers_1.polygon([
[
[currentX, currentY],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
}
else if (yi % 2 === 1 && xi % 2 === 1) {
cellTriangle1 = helpers_1.polygon([
[
[currentX, currentY],
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY],
],
], options.properties);
cellTriangle2 = helpers_1.polygon([
[
[currentX, currentY + cellHeight],
[currentX + cellWidth, currentY + cellHeight],
[currentX + cellWidth, currentY],
[currentX, currentY + cellHeight],
],
], options.properties);
}
if (options.mask) {
if (intersect_1.default(options.mask, cellTriangle1))
results.push(cellTriangle1);
if (intersect_1.default(options.mask, cellTriangle2))
results.push(cellTriangle2);
}
else {
results.push(cellTriangle1);
results.push(cellTriangle2);
}
currentY += cellHeight;
yi++;
}
xi++;
currentX += cellWidth;
}
return helpers_1.featureCollection(results);
}
exports.default = triangleGrid;

70
frontend/node_modules/@turf/triangle-grid/package.json generated vendored Normal file
View File

@@ -0,0 +1,70 @@
{
"name": "@turf/triangle-grid",
"version": "6.5.0",
"description": "turf triangle-grid module",
"author": "Turf Authors",
"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",
"triangle",
"grid",
"polygons",
"analysis",
"gis"
],
"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": {
"@turf/bbox-polygon": "^6.5.0",
"@turf/truncate": "^6.5.0",
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/distance": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/intersect": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}