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

76
frontend/node_modules/@turf/buffer/README.md generated vendored Normal file
View File

@@ -0,0 +1,76 @@
# @turf/buffer
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## buffer
Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
When using a negative radius, the resulting geometry may be invalid if
it's too small compared to the radius magnitude. If the input is a
FeatureCollection, only valid members will be returned in the output
FeatureCollection - i.e., the output collection may have fewer members than
the input, or even be empty.
**Parameters**
- `geojson` **([FeatureCollection][1] \| [Geometry][2] \| [Feature][3]&lt;any>)** input to be buffered
- `radius` **[number][4]** distance to draw the buffer (negative values are allowed)
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.units` **[string][6]** any of the options supported by turf units (optional, default `"kilometers"`)
- `options.steps` **[number][4]** number of steps (optional, default `8`)
**Examples**
```javascript
var point = turf.point([-90.548630, 14.616599]);
var buffered = turf.buffer(point, 500, {units: 'miles'});
//addToMap
var addToMap = [point, buffered]
```
Returns **([FeatureCollection][1] \| [Feature][3]&lt;([Polygon][7] \| [MultiPolygon][8])> | [undefined][9])** buffered features
[1]: https://tools.ietf.org/html/rfc7946#section-3.3
[2]: https://tools.ietf.org/html/rfc7946#section-3.1
[3]: https://tools.ietf.org/html/rfc7946#section-3.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
[8]: https://tools.ietf.org/html/rfc7946#section-3.1.7
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined
<!-- 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/buffer
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,175 @@
import center from '@turf/center';
import { GeoJSONReader, BufferOp, GeoJSONWriter } from 'turf-jsts';
import { featureEach, geomEach } from '@turf/meta';
import { geoAzimuthalEquidistant } from 'd3-geo';
import { featureCollection, earthRadius, radiansToLength, lengthToRadians, feature } from '@turf/helpers';
/**
* Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
*
* When using a negative radius, the resulting geometry may be invalid if
* it's too small compared to the radius magnitude. If the input is a
* FeatureCollection, only valid members will be returned in the output
* FeatureCollection - i.e., the output collection may have fewer members than
* the input, or even be empty.
*
* @name buffer
* @param {FeatureCollection|Geometry|Feature<any>} geojson input to be buffered
* @param {number} radius distance to draw the buffer (negative values are allowed)
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units="kilometers"] any of the options supported by turf units
* @param {number} [options.steps=8] number of steps
* @returns {FeatureCollection|Feature<Polygon|MultiPolygon>|undefined} buffered features
* @example
* var point = turf.point([-90.548630, 14.616599]);
* var buffered = turf.buffer(point, 500, {units: 'miles'});
*
* //addToMap
* var addToMap = [point, buffered]
*/
function buffer(geojson, radius, options) {
// Optional params
options = options || {};
// use user supplied options or default values
var units = options.units || "kilometers";
var steps = options.steps || 8;
// validation
if (!geojson) throw new Error("geojson is required");
if (typeof options !== "object") throw new Error("options must be an object");
if (typeof steps !== "number") throw new Error("steps must be an number");
// Allow negative buffers ("erosion") or zero-sized buffers ("repair geometry")
if (radius === undefined) throw new Error("radius is required");
if (steps <= 0) throw new Error("steps must be greater than 0");
var results = [];
switch (geojson.type) {
case "GeometryCollection":
geomEach(geojson, function (geometry) {
var buffered = bufferFeature(geometry, radius, units, steps);
if (buffered) results.push(buffered);
});
return featureCollection(results);
case "FeatureCollection":
featureEach(geojson, function (feature) {
var multiBuffered = bufferFeature(feature, radius, units, steps);
if (multiBuffered) {
featureEach(multiBuffered, function (buffered) {
if (buffered) results.push(buffered);
});
}
});
return featureCollection(results);
}
return bufferFeature(geojson, radius, units, steps);
}
/**
* Buffer single Feature/Geometry
*
* @private
* @param {Feature<any>} geojson input to be buffered
* @param {number} radius distance to draw the buffer
* @param {string} [units='kilometers'] any of the options supported by turf units
* @param {number} [steps=8] number of steps
* @returns {Feature<Polygon|MultiPolygon>} buffered feature
*/
function bufferFeature(geojson, radius, units, steps) {
var properties = geojson.properties || {};
var geometry = geojson.type === "Feature" ? geojson.geometry : geojson;
// Geometry Types faster than jsts
if (geometry.type === "GeometryCollection") {
var results = [];
geomEach(geojson, function (geometry) {
var buffered = bufferFeature(geometry, radius, units, steps);
if (buffered) results.push(buffered);
});
return featureCollection(results);
}
// Project GeoJSON to Azimuthal Equidistant projection (convert to Meters)
var projection = defineProjection(geometry);
var projected = {
type: geometry.type,
coordinates: projectCoords(geometry.coordinates, projection),
};
// JSTS buffer operation
var reader = new GeoJSONReader();
var geom = reader.read(projected);
var distance = radiansToLength(lengthToRadians(radius, units), "meters");
var buffered = BufferOp.bufferOp(geom, distance, steps);
var writer = new GeoJSONWriter();
buffered = writer.write(buffered);
// Detect if empty geometries
if (coordsIsNaN(buffered.coordinates)) return undefined;
// Unproject coordinates (convert to Degrees)
var result = {
type: buffered.type,
coordinates: unprojectCoords(buffered.coordinates, projection),
};
return feature(result, properties);
}
/**
* Coordinates isNaN
*
* @private
* @param {Array<any>} coords GeoJSON Coordinates
* @returns {boolean} if NaN exists
*/
function coordsIsNaN(coords) {
if (Array.isArray(coords[0])) return coordsIsNaN(coords[0]);
return isNaN(coords[0]);
}
/**
* Project coordinates to projection
*
* @private
* @param {Array<any>} coords to project
* @param {GeoProjection} proj D3 Geo Projection
* @returns {Array<any>} projected coordinates
*/
function projectCoords(coords, proj) {
if (typeof coords[0] !== "object") return proj(coords);
return coords.map(function (coord) {
return projectCoords(coord, proj);
});
}
/**
* Un-Project coordinates to projection
*
* @private
* @param {Array<any>} coords to un-project
* @param {GeoProjection} proj D3 Geo Projection
* @returns {Array<any>} un-projected coordinates
*/
function unprojectCoords(coords, proj) {
if (typeof coords[0] !== "object") return proj.invert(coords);
return coords.map(function (coord) {
return unprojectCoords(coord, proj);
});
}
/**
* Define Azimuthal Equidistant projection
*
* @private
* @param {Geometry|Feature<any>} geojson Base projection on center of GeoJSON
* @returns {GeoProjection} D3 Geo Azimuthal Equidistant Projection
*/
function defineProjection(geojson) {
var coords = center(geojson).geometry.coordinates;
var rotation = [-coords[0], -coords[1]];
return geoAzimuthalEquidistant().rotate(rotation).scale(earthRadius);
}
export default buffer;

View File

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

182
frontend/node_modules/@turf/buffer/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,182 @@
'use strict';
var center = require('@turf/center');
var turfJsts = require('turf-jsts');
var meta = require('@turf/meta');
var d3Geo = require('d3-geo');
var helpers = require('@turf/helpers');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var center__default = /*#__PURE__*/_interopDefaultLegacy(center);
/**
* Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
*
* When using a negative radius, the resulting geometry may be invalid if
* it's too small compared to the radius magnitude. If the input is a
* FeatureCollection, only valid members will be returned in the output
* FeatureCollection - i.e., the output collection may have fewer members than
* the input, or even be empty.
*
* @name buffer
* @param {FeatureCollection|Geometry|Feature<any>} geojson input to be buffered
* @param {number} radius distance to draw the buffer (negative values are allowed)
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units="kilometers"] any of the options supported by turf units
* @param {number} [options.steps=8] number of steps
* @returns {FeatureCollection|Feature<Polygon|MultiPolygon>|undefined} buffered features
* @example
* var point = turf.point([-90.548630, 14.616599]);
* var buffered = turf.buffer(point, 500, {units: 'miles'});
*
* //addToMap
* var addToMap = [point, buffered]
*/
function buffer(geojson, radius, options) {
// Optional params
options = options || {};
// use user supplied options or default values
var units = options.units || "kilometers";
var steps = options.steps || 8;
// validation
if (!geojson) throw new Error("geojson is required");
if (typeof options !== "object") throw new Error("options must be an object");
if (typeof steps !== "number") throw new Error("steps must be an number");
// Allow negative buffers ("erosion") or zero-sized buffers ("repair geometry")
if (radius === undefined) throw new Error("radius is required");
if (steps <= 0) throw new Error("steps must be greater than 0");
var results = [];
switch (geojson.type) {
case "GeometryCollection":
meta.geomEach(geojson, function (geometry) {
var buffered = bufferFeature(geometry, radius, units, steps);
if (buffered) results.push(buffered);
});
return helpers.featureCollection(results);
case "FeatureCollection":
meta.featureEach(geojson, function (feature) {
var multiBuffered = bufferFeature(feature, radius, units, steps);
if (multiBuffered) {
meta.featureEach(multiBuffered, function (buffered) {
if (buffered) results.push(buffered);
});
}
});
return helpers.featureCollection(results);
}
return bufferFeature(geojson, radius, units, steps);
}
/**
* Buffer single Feature/Geometry
*
* @private
* @param {Feature<any>} geojson input to be buffered
* @param {number} radius distance to draw the buffer
* @param {string} [units='kilometers'] any of the options supported by turf units
* @param {number} [steps=8] number of steps
* @returns {Feature<Polygon|MultiPolygon>} buffered feature
*/
function bufferFeature(geojson, radius, units, steps) {
var properties = geojson.properties || {};
var geometry = geojson.type === "Feature" ? geojson.geometry : geojson;
// Geometry Types faster than jsts
if (geometry.type === "GeometryCollection") {
var results = [];
meta.geomEach(geojson, function (geometry) {
var buffered = bufferFeature(geometry, radius, units, steps);
if (buffered) results.push(buffered);
});
return helpers.featureCollection(results);
}
// Project GeoJSON to Azimuthal Equidistant projection (convert to Meters)
var projection = defineProjection(geometry);
var projected = {
type: geometry.type,
coordinates: projectCoords(geometry.coordinates, projection),
};
// JSTS buffer operation
var reader = new turfJsts.GeoJSONReader();
var geom = reader.read(projected);
var distance = helpers.radiansToLength(helpers.lengthToRadians(radius, units), "meters");
var buffered = turfJsts.BufferOp.bufferOp(geom, distance, steps);
var writer = new turfJsts.GeoJSONWriter();
buffered = writer.write(buffered);
// Detect if empty geometries
if (coordsIsNaN(buffered.coordinates)) return undefined;
// Unproject coordinates (convert to Degrees)
var result = {
type: buffered.type,
coordinates: unprojectCoords(buffered.coordinates, projection),
};
return helpers.feature(result, properties);
}
/**
* Coordinates isNaN
*
* @private
* @param {Array<any>} coords GeoJSON Coordinates
* @returns {boolean} if NaN exists
*/
function coordsIsNaN(coords) {
if (Array.isArray(coords[0])) return coordsIsNaN(coords[0]);
return isNaN(coords[0]);
}
/**
* Project coordinates to projection
*
* @private
* @param {Array<any>} coords to project
* @param {GeoProjection} proj D3 Geo Projection
* @returns {Array<any>} projected coordinates
*/
function projectCoords(coords, proj) {
if (typeof coords[0] !== "object") return proj(coords);
return coords.map(function (coord) {
return projectCoords(coord, proj);
});
}
/**
* Un-Project coordinates to projection
*
* @private
* @param {Array<any>} coords to un-project
* @param {GeoProjection} proj D3 Geo Projection
* @returns {Array<any>} un-projected coordinates
*/
function unprojectCoords(coords, proj) {
if (typeof coords[0] !== "object") return proj.invert(coords);
return coords.map(function (coord) {
return unprojectCoords(coord, proj);
});
}
/**
* Define Azimuthal Equidistant projection
*
* @private
* @param {Geometry|Feature<any>} geojson Base projection on center of GeoJSON
* @returns {GeoProjection} D3 Geo Azimuthal Equidistant Projection
*/
function defineProjection(geojson) {
var coords = center__default['default'](geojson).geometry.coordinates;
var rotation = [-coords[0], -coords[1]];
return d3Geo.geoAzimuthalEquidistant().rotate(rotation).scale(helpers.earthRadius);
}
module.exports = buffer;
module.exports.default = buffer;

61
frontend/node_modules/@turf/buffer/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,61 @@
import {
Point,
LineString,
Polygon,
MultiPoint,
MultiLineString,
MultiPolygon,
GeometryObject,
GeometryCollection,
Feature,
FeatureCollection,
Units,
} from "@turf/helpers";
interface Options {
units?: Units;
steps?: number;
}
/**
* http://turfjs.org/docs/#buffer
*/
declare function buffer<Geom extends Point | LineString | Polygon>(
feature: Feature<Geom> | Geom,
radius?: number,
options?: Options
): Feature<Polygon>;
declare function buffer<
Geom extends MultiPoint | MultiLineString | MultiPolygon
>(
feature: Feature<Geom> | Geom,
radius?: number,
options?: Options
): Feature<MultiPolygon>;
declare function buffer<Geom extends Point | LineString | Polygon>(
feature: FeatureCollection<Geom>,
radius?: number,
options?: Options
): FeatureCollection<Polygon>;
declare function buffer<
Geom extends MultiPoint | MultiLineString | MultiPolygon
>(
feature: FeatureCollection<Geom>,
radius?: number,
options?: Options
): FeatureCollection<MultiPolygon>;
declare function buffer(
feature:
| FeatureCollection<any>
| Feature<GeometryCollection>
| GeometryCollection,
radius?: number,
options?: Options
): FeatureCollection<Polygon | MultiPolygon>;
declare function buffer(
feature: Feature<any> | GeometryObject,
radius?: number,
options?: Options
): Feature<Polygon | MultiPolygon>;
export default buffer;

75
frontend/node_modules/@turf/buffer/package.json generated vendored Normal file
View File

@@ -0,0 +1,75 @@
{
"name": "@turf/buffer",
"version": "6.5.0",
"description": "turf buffer module",
"author": "Turf Authors",
"contributors": [
"Tom MacWright <@tmcw>",
"Denis Carriere <@DenisCarriere>",
"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": [
"buffer",
"offset",
"polygon",
"linestring",
"point",
"geojson",
"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": "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": "*",
"load-json-file": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/bbox": "^6.5.0",
"@turf/center": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/meta": "^6.5.0",
"@turf/projection": "^6.5.0",
"d3-geo": "1.7.1",
"turf-jsts": "*"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}