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

74
frontend/node_modules/@turf/interpolate/README.md generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# @turf/interpolate
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## interpolate
Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method][1].
**Parameters**
- `points` **[FeatureCollection][2]&lt;[Point][3]>** with known value
- `cellSize` **[number][4]** the distance across each grid point
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.gridType` **[string][6]** defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle') (optional, default `'square'`)
- `options.property` **[string][6]** the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. (optional, default `'elevation'`)
- `options.units` **[string][6]** used in calculating cellSize, can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
- `options.weight` **[number][4]** exponent regulating the distance-decay weighting (optional, default `1`)
**Examples**
```javascript
var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
// add a random property to each point
turf.featureEach(points, function(point) {
point.properties.solRad = Math.random() * 50;
});
var options = {gridType: 'points', property: 'solRad', units: 'miles'};
var grid = turf.interpolate(points, 100, options);
//addToMap
var addToMap = [grid];
```
Returns **[FeatureCollection][2]&lt;([Point][3] \| [Polygon][7])>** grid of points or polygons with interpolated 'property'
[1]: https://en.wikipedia.org/wiki/Inverse_distance_weighting
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6
<!-- 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/interpolate
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

107
frontend/node_modules/@turf/interpolate/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,107 @@
import bbox from '@turf/bbox';
import hexGrid from '@turf/hex-grid';
import pointGrid from '@turf/point-grid';
import distance from '@turf/distance';
import centroid from '@turf/centroid';
import squareGrid from '@turf/square-grid';
import triangleGrid from '@turf/triangle-grid';
import clone from '@turf/clone';
import { featureCollection } from '@turf/helpers';
import { featureEach } from '@turf/meta';
import { collectionOf } from '@turf/invariant';
/**
* Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting).
*
* @name interpolate
* @param {FeatureCollection<Point>} points with known value
* @param {number} cellSize the distance across each grid point
* @param {Object} [options={}] Optional parameters
* @param {string} [options.gridType='square'] defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle')
* @param {string} [options.property='elevation'] the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists.
* @param {string} [options.units='kilometers'] used in calculating cellSize, can be degrees, radians, miles, or kilometers
* @param {number} [options.weight=1] exponent regulating the distance-decay weighting
* @returns {FeatureCollection<Point|Polygon>} grid of points or polygons with interpolated 'property'
* @example
* var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
*
* // add a random property to each point
* turf.featureEach(points, function(point) {
* point.properties.solRad = Math.random() * 50;
* });
* var options = {gridType: 'points', property: 'solRad', units: 'miles'};
* var grid = turf.interpolate(points, 100, options);
*
* //addToMap
* var addToMap = [grid];
*/
function interpolate(points, cellSize, options) {
// Optional parameters
options = options || {};
if (typeof options !== "object") throw new Error("options is invalid");
var gridType = options.gridType;
var property = options.property;
var weight = options.weight;
// validation
if (!points) throw new Error("points is required");
collectionOf(points, "Point", "input must contain Points");
if (!cellSize) throw new Error("cellSize is required");
if (weight !== undefined && typeof weight !== "number")
throw new Error("weight must be a number");
// default values
property = property || "elevation";
gridType = gridType || "square";
weight = weight || 1;
var box = bbox(points);
var grid;
switch (gridType) {
case "point":
case "points":
grid = pointGrid(box, cellSize, options);
break;
case "square":
case "squares":
grid = squareGrid(box, cellSize, options);
break;
case "hex":
case "hexes":
grid = hexGrid(box, cellSize, options);
break;
case "triangle":
case "triangles":
grid = triangleGrid(box, cellSize, options);
break;
default:
throw new Error("invalid gridType");
}
var results = [];
featureEach(grid, function (gridFeature) {
var zw = 0;
var sw = 0;
// calculate the distance from each input point to the grid points
featureEach(points, function (point) {
var gridPoint =
gridType === "point" ? gridFeature : centroid(gridFeature);
var d = distance(gridPoint, point, options);
var zValue;
// property has priority for zValue, fallbacks to 3rd coordinate from geometry
if (property !== undefined) zValue = point.properties[property];
if (zValue === undefined) zValue = point.geometry.coordinates[2];
if (zValue === undefined) throw new Error("zValue is missing");
if (d === 0) zw = zValue;
var w = 1.0 / Math.pow(d, weight);
sw += w;
zw += w * zValue;
});
// write interpolated value for each grid point
var newFeature = clone(gridFeature);
newFeature.properties[property] = zw / sw;
results.push(newFeature);
});
return featureCollection(results);
}
export default interpolate;

View File

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

121
frontend/node_modules/@turf/interpolate/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,121 @@
'use strict';
var bbox = require('@turf/bbox');
var hexGrid = require('@turf/hex-grid');
var pointGrid = require('@turf/point-grid');
var distance = require('@turf/distance');
var centroid = require('@turf/centroid');
var squareGrid = require('@turf/square-grid');
var triangleGrid = require('@turf/triangle-grid');
var clone = require('@turf/clone');
var helpers = require('@turf/helpers');
var meta = require('@turf/meta');
var invariant = require('@turf/invariant');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var bbox__default = /*#__PURE__*/_interopDefaultLegacy(bbox);
var hexGrid__default = /*#__PURE__*/_interopDefaultLegacy(hexGrid);
var pointGrid__default = /*#__PURE__*/_interopDefaultLegacy(pointGrid);
var distance__default = /*#__PURE__*/_interopDefaultLegacy(distance);
var centroid__default = /*#__PURE__*/_interopDefaultLegacy(centroid);
var squareGrid__default = /*#__PURE__*/_interopDefaultLegacy(squareGrid);
var triangleGrid__default = /*#__PURE__*/_interopDefaultLegacy(triangleGrid);
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
/**
* Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method](https://en.wikipedia.org/wiki/Inverse_distance_weighting).
*
* @name interpolate
* @param {FeatureCollection<Point>} points with known value
* @param {number} cellSize the distance across each grid point
* @param {Object} [options={}] Optional parameters
* @param {string} [options.gridType='square'] defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle')
* @param {string} [options.property='elevation'] the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists.
* @param {string} [options.units='kilometers'] used in calculating cellSize, can be degrees, radians, miles, or kilometers
* @param {number} [options.weight=1] exponent regulating the distance-decay weighting
* @returns {FeatureCollection<Point|Polygon>} grid of points or polygons with interpolated 'property'
* @example
* var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
*
* // add a random property to each point
* turf.featureEach(points, function(point) {
* point.properties.solRad = Math.random() * 50;
* });
* var options = {gridType: 'points', property: 'solRad', units: 'miles'};
* var grid = turf.interpolate(points, 100, options);
*
* //addToMap
* var addToMap = [grid];
*/
function interpolate(points, cellSize, options) {
// Optional parameters
options = options || {};
if (typeof options !== "object") throw new Error("options is invalid");
var gridType = options.gridType;
var property = options.property;
var weight = options.weight;
// validation
if (!points) throw new Error("points is required");
invariant.collectionOf(points, "Point", "input must contain Points");
if (!cellSize) throw new Error("cellSize is required");
if (weight !== undefined && typeof weight !== "number")
throw new Error("weight must be a number");
// default values
property = property || "elevation";
gridType = gridType || "square";
weight = weight || 1;
var box = bbox__default['default'](points);
var grid;
switch (gridType) {
case "point":
case "points":
grid = pointGrid__default['default'](box, cellSize, options);
break;
case "square":
case "squares":
grid = squareGrid__default['default'](box, cellSize, options);
break;
case "hex":
case "hexes":
grid = hexGrid__default['default'](box, cellSize, options);
break;
case "triangle":
case "triangles":
grid = triangleGrid__default['default'](box, cellSize, options);
break;
default:
throw new Error("invalid gridType");
}
var results = [];
meta.featureEach(grid, function (gridFeature) {
var zw = 0;
var sw = 0;
// calculate the distance from each input point to the grid points
meta.featureEach(points, function (point) {
var gridPoint =
gridType === "point" ? gridFeature : centroid__default['default'](gridFeature);
var d = distance__default['default'](gridPoint, point, options);
var zValue;
// property has priority for zValue, fallbacks to 3rd coordinate from geometry
if (property !== undefined) zValue = point.properties[property];
if (zValue === undefined) zValue = point.geometry.coordinates[2];
if (zValue === undefined) throw new Error("zValue is missing");
if (d === 0) zw = zValue;
var w = 1.0 / Math.pow(d, weight);
sw += w;
zw += w * zValue;
});
// write interpolated value for each grid point
var newFeature = clone__default['default'](gridFeature);
newFeature.properties[property] = zw / sw;
results.push(newFeature);
});
return helpers.featureCollection(results);
}
module.exports = interpolate;
module.exports.default = interpolate;

25
frontend/node_modules/@turf/interpolate/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import { Point, Polygon, Units, FeatureCollection, Grid } from "@turf/helpers";
/**
* http://turfjs.org/docs/#interpolate
*/
export default function interpolate(
points: FeatureCollection<Point>,
cellSize: number,
options?: {
gridType?: "point";
property?: string;
units?: Units;
weight?: number;
}
): FeatureCollection<Point>;
export default function interpolate(
points: FeatureCollection<Point>,
cellSize: number,
options?: {
gridType?: Grid;
property?: string;
units?: Units;
weight?: number;
}
): FeatureCollection<Polygon>;

74
frontend/node_modules/@turf/interpolate/package.json generated vendored Normal file
View File

@@ -0,0 +1,74 @@
{
"name": "@turf/interpolate",
"version": "6.5.0",
"description": "turf interpolate 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",
"idw",
"interpolate"
],
"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": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"scripts": {
"bench": "node -r esm bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"@turf/truncate": "^6.5.0",
"benchmark": "*",
"chromatism": "*",
"load-json-file": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/bbox": "^6.5.0",
"@turf/centroid": "^6.5.0",
"@turf/clone": "^6.5.0",
"@turf/distance": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/hex-grid": "^6.5.0",
"@turf/invariant": "^6.5.0",
"@turf/meta": "^6.5.0",
"@turf/point-grid": "^6.5.0",
"@turf/square-grid": "^6.5.0",
"@turf/triangle-grid": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}