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

78
frontend/node_modules/@turf/projection/README.md generated vendored Normal file
View File

@@ -0,0 +1,78 @@
# @turf/projection
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## toMercator
Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
**Parameters**
- `geojson` **([GeoJSON][1] | Position)** WGS84 GeoJSON object
- `options` **[Object][2]?** Optional parameters
- `options.mutate` **[boolean][3]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
**Examples**
```javascript
var pt = turf.point([-71,41]);
var converted = turf.toMercator(pt);
//addToMap
var addToMap = [pt, converted];
```
Returns **[GeoJSON][1]** Projected GeoJSON
## toWgs84
Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
**Parameters**
- `geojson` **([GeoJSON][1] | Position)** Mercator GeoJSON object
- `options` **[Object][2]?** Optional parameters
- `options.mutate` **[boolean][3]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
**Examples**
```javascript
var pt = turf.point([-7903683.846322424, 5012341.663847514]);
var converted = turf.toWgs84(pt);
//addToMap
var addToMap = [pt, converted];
```
Returns **[GeoJSON][1]** Projected GeoJSON
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[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/projection
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,137 @@
import { coordEach } from "@turf/meta";
import { isNumber } from "@turf/helpers";
import clone from "@turf/clone";
/**
* Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
*
* @name toMercator
* @param {GeoJSON|Position} geojson WGS84 GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-71,41]);
* var converted = turf.toMercator(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
export function toMercator(geojson, options) {
if (options === void 0) { options = {}; }
return convert(geojson, "mercator", options);
}
/**
* Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
*
* @name toWgs84
* @param {GeoJSON|Position} geojson Mercator GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-7903683.846322424, 5012341.663847514]);
* var converted = turf.toWgs84(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
export function toWgs84(geojson, options) {
if (options === void 0) { options = {}; }
return convert(geojson, "wgs84", options);
}
/**
* Converts a GeoJSON coordinates to the defined `projection`
*
* @private
* @param {GeoJSON} geojson GeoJSON Feature or Geometry
* @param {string} projection defines the projection system to convert the coordinates to
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Converted GeoJSON
*/
function convert(geojson, projection, options) {
if (options === void 0) { options = {}; }
// Optional parameters
options = options || {};
var mutate = options.mutate;
// Validation
if (!geojson)
throw new Error("geojson is required");
// Handle Position
if (Array.isArray(geojson) && isNumber(geojson[0]))
geojson =
projection === "mercator"
? convertToMercator(geojson)
: convertToWgs84(geojson);
// Handle GeoJSON
else {
// Handle possible data mutation
if (mutate !== true)
geojson = clone(geojson);
coordEach(geojson, function (coord) {
var newCoord = projection === "mercator"
? convertToMercator(coord)
: convertToWgs84(coord);
coord[0] = newCoord[0];
coord[1] = newCoord[1];
});
}
return geojson;
}
/**
* Convert lon/lat values to 900913 x/y.
* (from https://github.com/mapbox/sphericalmercator)
*
* @private
* @param {Array<number>} lonLat WGS84 point
* @returns {Array<number>} Mercator [x, y] point
*/
function convertToMercator(lonLat) {
var D2R = Math.PI / 180,
// 900913 properties
A = 6378137.0, MAXEXTENT = 20037508.342789244;
// compensate longitudes passing the 180th meridian
// from https://github.com/proj4js/proj4js/blob/master/lib/common/adjust_lon.js
var adjusted = Math.abs(lonLat[0]) <= 180 ? lonLat[0] : lonLat[0] - sign(lonLat[0]) * 360;
var xy = [
A * adjusted * D2R,
A * Math.log(Math.tan(Math.PI * 0.25 + 0.5 * lonLat[1] * D2R)),
];
// if xy value is beyond maxextent (e.g. poles), return maxextent
if (xy[0] > MAXEXTENT)
xy[0] = MAXEXTENT;
if (xy[0] < -MAXEXTENT)
xy[0] = -MAXEXTENT;
if (xy[1] > MAXEXTENT)
xy[1] = MAXEXTENT;
if (xy[1] < -MAXEXTENT)
xy[1] = -MAXEXTENT;
return xy;
}
/**
* Convert 900913 x/y values to lon/lat.
* (from https://github.com/mapbox/sphericalmercator)
*
* @private
* @param {Array<number>} xy Mercator [x, y] point
* @returns {Array<number>} WGS84 [lon, lat] point
*/
function convertToWgs84(xy) {
// 900913 properties.
var R2D = 180 / Math.PI;
var A = 6378137.0;
return [
(xy[0] * R2D) / A,
(Math.PI * 0.5 - 2.0 * Math.atan(Math.exp(-xy[1] / A))) * R2D,
];
}
/**
* Returns the sign of the input, or zero
*
* @private
* @param {number} x input
* @returns {number} -1|0|1 output
*/
function sign(x) {
return x < 0 ? -1 : x > 0 ? 1 : 0;
}

View File

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

37
frontend/node_modules/@turf/projection/dist/js/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,37 @@
import { AllGeoJSON, Position } from "@turf/helpers";
/**
* Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
*
* @name toMercator
* @param {GeoJSON|Position} geojson WGS84 GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-71,41]);
* var converted = turf.toMercator(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
export declare function toMercator<G = AllGeoJSON | Position>(geojson: G, options?: {
mutate?: boolean;
}): G;
/**
* Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
*
* @name toWgs84
* @param {GeoJSON|Position} geojson Mercator GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-7903683.846322424, 5012341.663847514]);
* var converted = turf.toWgs84(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
export declare function toWgs84<G = AllGeoJSON | Position>(geojson: G, options?: {
mutate?: boolean;
}): G;

144
frontend/node_modules/@turf/projection/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 meta_1 = require("@turf/meta");
var helpers_1 = require("@turf/helpers");
var clone_1 = __importDefault(require("@turf/clone"));
/**
* Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
*
* @name toMercator
* @param {GeoJSON|Position} geojson WGS84 GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-71,41]);
* var converted = turf.toMercator(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
function toMercator(geojson, options) {
if (options === void 0) { options = {}; }
return convert(geojson, "mercator", options);
}
exports.toMercator = toMercator;
/**
* Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
*
* @name toWgs84
* @param {GeoJSON|Position} geojson Mercator GeoJSON object
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Projected GeoJSON
* @example
* var pt = turf.point([-7903683.846322424, 5012341.663847514]);
* var converted = turf.toWgs84(pt);
*
* //addToMap
* var addToMap = [pt, converted];
*/
function toWgs84(geojson, options) {
if (options === void 0) { options = {}; }
return convert(geojson, "wgs84", options);
}
exports.toWgs84 = toWgs84;
/**
* Converts a GeoJSON coordinates to the defined `projection`
*
* @private
* @param {GeoJSON} geojson GeoJSON Feature or Geometry
* @param {string} projection defines the projection system to convert the coordinates to
* @param {Object} [options] Optional parameters
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} Converted GeoJSON
*/
function convert(geojson, projection, options) {
if (options === void 0) { options = {}; }
// Optional parameters
options = options || {};
var mutate = options.mutate;
// Validation
if (!geojson)
throw new Error("geojson is required");
// Handle Position
if (Array.isArray(geojson) && helpers_1.isNumber(geojson[0]))
geojson =
projection === "mercator"
? convertToMercator(geojson)
: convertToWgs84(geojson);
// Handle GeoJSON
else {
// Handle possible data mutation
if (mutate !== true)
geojson = clone_1.default(geojson);
meta_1.coordEach(geojson, function (coord) {
var newCoord = projection === "mercator"
? convertToMercator(coord)
: convertToWgs84(coord);
coord[0] = newCoord[0];
coord[1] = newCoord[1];
});
}
return geojson;
}
/**
* Convert lon/lat values to 900913 x/y.
* (from https://github.com/mapbox/sphericalmercator)
*
* @private
* @param {Array<number>} lonLat WGS84 point
* @returns {Array<number>} Mercator [x, y] point
*/
function convertToMercator(lonLat) {
var D2R = Math.PI / 180,
// 900913 properties
A = 6378137.0, MAXEXTENT = 20037508.342789244;
// compensate longitudes passing the 180th meridian
// from https://github.com/proj4js/proj4js/blob/master/lib/common/adjust_lon.js
var adjusted = Math.abs(lonLat[0]) <= 180 ? lonLat[0] : lonLat[0] - sign(lonLat[0]) * 360;
var xy = [
A * adjusted * D2R,
A * Math.log(Math.tan(Math.PI * 0.25 + 0.5 * lonLat[1] * D2R)),
];
// if xy value is beyond maxextent (e.g. poles), return maxextent
if (xy[0] > MAXEXTENT)
xy[0] = MAXEXTENT;
if (xy[0] < -MAXEXTENT)
xy[0] = -MAXEXTENT;
if (xy[1] > MAXEXTENT)
xy[1] = MAXEXTENT;
if (xy[1] < -MAXEXTENT)
xy[1] = -MAXEXTENT;
return xy;
}
/**
* Convert 900913 x/y values to lon/lat.
* (from https://github.com/mapbox/sphericalmercator)
*
* @private
* @param {Array<number>} xy Mercator [x, y] point
* @returns {Array<number>} WGS84 [lon, lat] point
*/
function convertToWgs84(xy) {
// 900913 properties.
var R2D = 180 / Math.PI;
var A = 6378137.0;
return [
(xy[0] * R2D) / A,
(Math.PI * 0.5 - 2.0 * Math.atan(Math.exp(-xy[1] / A))) * R2D,
];
}
/**
* Returns the sign of the input, or zero
*
* @private
* @param {number} x input
* @returns {number} -1|0|1 output
*/
function sign(x) {
return x < 0 ? -1 : x > 0 ? 1 : 0;
}

80
frontend/node_modules/@turf/projection/package.json generated vendored Normal file
View File

@@ -0,0 +1,80 @@
{
"name": "@turf/projection",
"version": "6.5.0",
"description": "turf projection 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",
"projection",
"to-mercator",
"to-wgs84",
"EPSG:4326",
"WGS84",
"mercator",
"web-mercator",
"EPSG:3857",
"EPSG:3785",
"900913",
"EPSG:900913",
"EPSG:102113"
],
"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/truncate": "^6.5.0",
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"proj4": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/clone": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/meta": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}