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/center-mean/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.

75
frontend/node_modules/@turf/center-mean/README.md generated vendored Normal file
View File

@@ -0,0 +1,75 @@
# @turf/center-mean
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## centerMean
Takes a [Feature][1] or [FeatureCollection][2] and returns the mean center. Can be weighted.
**Parameters**
- `geojson` **[GeoJSON][3]** GeoJSON to be centered
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.properties` **[Object][4]** Translate GeoJSON Properties to Point (optional, default `{}`)
- `options.bbox` **[Object][4]** Translate GeoJSON BBox to Point (optional, default `{}`)
- `options.id` **[Object][4]** Translate GeoJSON Id to Point (optional, default `{}`)
- `options.weight` **[string][5]?** the property name used to weight the center
**Examples**
```javascript
var features = turf.featureCollection([
turf.point([-97.522259, 35.4691], {value: 10}),
turf.point([-97.502754, 35.463455], {value: 3}),
turf.point([-97.508269, 35.463245], {value: 5})
]);
var options = {weight: "value"}
var mean = turf.centerMean(features, options);
//addToMap
var addToMap = [features, mean]
mean.properties['marker-size'] = 'large';
mean.properties['marker-color'] = '#000';
```
Returns **[Feature][6]&lt;[Point][7]>** a Point feature at the mean center point of all input features
[1]: https://tools.ietf.org/html/rfc7946#section-3.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://tools.ietf.org/html/rfc7946#section-3
[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.2
<!-- 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/center-mean
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

51
frontend/node_modules/@turf/center-mean/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,51 @@
import { geomEach, coordEach } from "@turf/meta";
import { isNumber, point, } from "@turf/helpers";
/**
* Takes a {@link Feature} or {@link FeatureCollection} and returns the mean center. Can be weighted.
*
* @name centerMean
* @param {GeoJSON} geojson GeoJSON to be centered
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] Translate GeoJSON Properties to Point
* @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point
* @param {Object} [options.id={}] Translate GeoJSON Id to Point
* @param {string} [options.weight] the property name used to weight the center
* @returns {Feature<Point>} a Point feature at the mean center point of all input features
* @example
* var features = turf.featureCollection([
* turf.point([-97.522259, 35.4691], {value: 10}),
* turf.point([-97.502754, 35.463455], {value: 3}),
* turf.point([-97.508269, 35.463245], {value: 5})
* ]);
*
* var options = {weight: "value"}
* var mean = turf.centerMean(features, options);
*
* //addToMap
* var addToMap = [features, mean]
* mean.properties['marker-size'] = 'large';
* mean.properties['marker-color'] = '#000';
*/
function centerMean(geojson, // To-Do include Typescript AllGeoJSON
options) {
if (options === void 0) { options = {}; }
var sumXs = 0;
var sumYs = 0;
var sumNs = 0;
geomEach(geojson, function (geom, featureIndex, properties) {
var weight = options.weight ? properties === null || properties === void 0 ? void 0 : properties[options.weight] : undefined;
weight = weight === undefined || weight === null ? 1 : weight;
if (!isNumber(weight))
throw new Error("weight value must be a number for feature index " + featureIndex);
weight = Number(weight);
if (weight > 0) {
coordEach(geom, function (coord) {
sumXs += coord[0] * weight;
sumYs += coord[1] * weight;
sumNs += weight;
});
}
});
return point([sumXs / sumNs, sumYs / sumNs], options.properties, options);
}
export default centerMean;

View File

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

35
frontend/node_modules/@turf/center-mean/dist/js/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,35 @@
import { Feature, Point, Properties, BBox, Id } from "@turf/helpers";
/**
* Takes a {@link Feature} or {@link FeatureCollection} and returns the mean center. Can be weighted.
*
* @name centerMean
* @param {GeoJSON} geojson GeoJSON to be centered
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] Translate GeoJSON Properties to Point
* @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point
* @param {Object} [options.id={}] Translate GeoJSON Id to Point
* @param {string} [options.weight] the property name used to weight the center
* @returns {Feature<Point>} a Point feature at the mean center point of all input features
* @example
* var features = turf.featureCollection([
* turf.point([-97.522259, 35.4691], {value: 10}),
* turf.point([-97.502754, 35.463455], {value: 3}),
* turf.point([-97.508269, 35.463245], {value: 5})
* ]);
*
* var options = {weight: "value"}
* var mean = turf.centerMean(features, options);
*
* //addToMap
* var addToMap = [features, mean]
* mean.properties['marker-size'] = 'large';
* mean.properties['marker-color'] = '#000';
*/
declare function centerMean<P = Properties>(geojson: any, // To-Do include Typescript AllGeoJSON
options?: {
properties?: P;
bbox?: BBox;
id?: Id;
weight?: string;
}): Feature<Point, P>;
export default centerMean;

53
frontend/node_modules/@turf/center-mean/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var meta_1 = require("@turf/meta");
var helpers_1 = require("@turf/helpers");
/**
* Takes a {@link Feature} or {@link FeatureCollection} and returns the mean center. Can be weighted.
*
* @name centerMean
* @param {GeoJSON} geojson GeoJSON to be centered
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] Translate GeoJSON Properties to Point
* @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point
* @param {Object} [options.id={}] Translate GeoJSON Id to Point
* @param {string} [options.weight] the property name used to weight the center
* @returns {Feature<Point>} a Point feature at the mean center point of all input features
* @example
* var features = turf.featureCollection([
* turf.point([-97.522259, 35.4691], {value: 10}),
* turf.point([-97.502754, 35.463455], {value: 3}),
* turf.point([-97.508269, 35.463245], {value: 5})
* ]);
*
* var options = {weight: "value"}
* var mean = turf.centerMean(features, options);
*
* //addToMap
* var addToMap = [features, mean]
* mean.properties['marker-size'] = 'large';
* mean.properties['marker-color'] = '#000';
*/
function centerMean(geojson, // To-Do include Typescript AllGeoJSON
options) {
if (options === void 0) { options = {}; }
var sumXs = 0;
var sumYs = 0;
var sumNs = 0;
meta_1.geomEach(geojson, function (geom, featureIndex, properties) {
var weight = options.weight ? properties === null || properties === void 0 ? void 0 : properties[options.weight] : undefined;
weight = weight === undefined || weight === null ? 1 : weight;
if (!helpers_1.isNumber(weight))
throw new Error("weight value must be a number for feature index " + featureIndex);
weight = Number(weight);
if (weight > 0) {
meta_1.coordEach(geom, function (coord) {
sumXs += coord[0] * weight;
sumYs += coord[1] * weight;
sumNs += weight;
});
}
});
return helpers_1.point([sumXs / sumNs, sumYs / sumNs], options.properties, options);
}
exports.default = centerMean;

75
frontend/node_modules/@turf/center-mean/package.json generated vendored Normal file
View File

@@ -0,0 +1,75 @@
{
"name": "@turf/center-mean",
"version": "6.5.0",
"description": "turf center-mean module",
"author": "Turf Authors",
"contributors": [
"Moacir P. de Sá Pereira <@muziejus>"
],
"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": [
"center",
"mean",
"geojson",
"gis",
"geospatial",
"geo",
"turf"
],
"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/center": "^6.5.0",
"@turf/truncate": "^6.5.0",
"@types/tape": "*",
"benchmark": "*",
"glob": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/bbox": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/meta": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}