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/line-chunk/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/line-chunk/README.md generated vendored Normal file
View File

@@ -0,0 +1,74 @@
# @turf/line-chunk
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## lineChunk
Divides a [LineString][1] into chunks of a specified length.
If the line is shorter than the segment length then the original line is returned.
**Parameters**
- `geojson` **([FeatureCollection][2] \| [Geometry][3] \| [Feature][4]&lt;([LineString][5] \| [MultiLineString][6])>)** the lines to split
- `segmentLength` **[number][7]** how long to make each segment
- `options` **[Object][8]** Optional parameters (optional, default `{}`)
- `options.units` **[string][9]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
- `options.reverse` **[boolean][10]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
**Examples**
```javascript
var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);
var chunk = turf.lineChunk(line, 15, {units: 'miles'});
//addToMap
var addToMap = [chunk];
```
Returns **[FeatureCollection][2]&lt;[LineString][5]>** collection of line segments
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[2]: https://tools.ietf.org/html/rfc7946#section-3.3
[3]: https://tools.ietf.org/html/rfc7946#section-3.1
[4]: https://tools.ietf.org/html/rfc7946#section-3.2
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.5
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[10]: 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/line-chunk
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

87
frontend/node_modules/@turf/line-chunk/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,87 @@
import length from '@turf/length';
import lineSliceAlong from '@turf/line-slice-along';
import { flattenEach } from '@turf/meta';
import { isObject, featureCollection } from '@turf/helpers';
/**
* Divides a {@link LineString} into chunks of a specified length.
* If the line is shorter than the segment length then the original line is returned.
*
* @name lineChunk
* @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split
* @param {number} segmentLength how long to make each segment
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] units can be degrees, radians, miles, or kilometers
* @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end
* @returns {FeatureCollection<LineString>} collection of line segments
* @example
* var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);
*
* var chunk = turf.lineChunk(line, 15, {units: 'miles'});
*
* //addToMap
* var addToMap = [chunk];
*/
function lineChunk(geojson, segmentLength, options) {
// Optional parameters
options = options || {};
if (!isObject(options)) throw new Error("options is invalid");
var units = options.units;
var reverse = options.reverse;
// Validation
if (!geojson) throw new Error("geojson is required");
if (segmentLength <= 0)
throw new Error("segmentLength must be greater than 0");
// Container
var results = [];
// Flatten each feature to simple LineString
flattenEach(geojson, function (feature) {
// reverses coordinates to start the first chunked segment at the end
if (reverse)
feature.geometry.coordinates = feature.geometry.coordinates.reverse();
sliceLineSegments(feature, segmentLength, units, function (segment) {
results.push(segment);
});
});
return featureCollection(results);
}
/**
* Slice Line Segments
*
* @private
* @param {Feature<LineString>} line GeoJSON LineString
* @param {number} segmentLength how long to make each segment
* @param {string}[units='kilometers'] units can be degrees, radians, miles, or kilometers
* @param {Function} callback iterate over sliced line segments
* @returns {void}
*/
function sliceLineSegments(line, segmentLength, units, callback) {
var lineLength = length(line, { units: units });
// If the line is shorter than the segment length then the orginal line is returned.
if (lineLength <= segmentLength) return callback(line);
var numberOfSegments = lineLength / segmentLength;
// If numberOfSegments is integer, no need to plus 1
if (!Number.isInteger(numberOfSegments)) {
numberOfSegments = Math.floor(numberOfSegments) + 1;
}
for (var i = 0; i < numberOfSegments; i++) {
var outline = lineSliceAlong(
line,
segmentLength * i,
segmentLength * (i + 1),
{ units: units }
);
callback(outline, i);
}
}
export default lineChunk;

View File

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

95
frontend/node_modules/@turf/line-chunk/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,95 @@
'use strict';
var length = require('@turf/length');
var lineSliceAlong = require('@turf/line-slice-along');
var meta = require('@turf/meta');
var helpers = require('@turf/helpers');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var length__default = /*#__PURE__*/_interopDefaultLegacy(length);
var lineSliceAlong__default = /*#__PURE__*/_interopDefaultLegacy(lineSliceAlong);
/**
* Divides a {@link LineString} into chunks of a specified length.
* If the line is shorter than the segment length then the original line is returned.
*
* @name lineChunk
* @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split
* @param {number} segmentLength how long to make each segment
* @param {Object} [options={}] Optional parameters
* @param {string} [options.units='kilometers'] units can be degrees, radians, miles, or kilometers
* @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end
* @returns {FeatureCollection<LineString>} collection of line segments
* @example
* var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);
*
* var chunk = turf.lineChunk(line, 15, {units: 'miles'});
*
* //addToMap
* var addToMap = [chunk];
*/
function lineChunk(geojson, segmentLength, options) {
// Optional parameters
options = options || {};
if (!helpers.isObject(options)) throw new Error("options is invalid");
var units = options.units;
var reverse = options.reverse;
// Validation
if (!geojson) throw new Error("geojson is required");
if (segmentLength <= 0)
throw new Error("segmentLength must be greater than 0");
// Container
var results = [];
// Flatten each feature to simple LineString
meta.flattenEach(geojson, function (feature) {
// reverses coordinates to start the first chunked segment at the end
if (reverse)
feature.geometry.coordinates = feature.geometry.coordinates.reverse();
sliceLineSegments(feature, segmentLength, units, function (segment) {
results.push(segment);
});
});
return helpers.featureCollection(results);
}
/**
* Slice Line Segments
*
* @private
* @param {Feature<LineString>} line GeoJSON LineString
* @param {number} segmentLength how long to make each segment
* @param {string}[units='kilometers'] units can be degrees, radians, miles, or kilometers
* @param {Function} callback iterate over sliced line segments
* @returns {void}
*/
function sliceLineSegments(line, segmentLength, units, callback) {
var lineLength = length__default['default'](line, { units: units });
// If the line is shorter than the segment length then the orginal line is returned.
if (lineLength <= segmentLength) return callback(line);
var numberOfSegments = lineLength / segmentLength;
// If numberOfSegments is integer, no need to plus 1
if (!Number.isInteger(numberOfSegments)) {
numberOfSegments = Math.floor(numberOfSegments) + 1;
}
for (var i = 0; i < numberOfSegments; i++) {
var outline = lineSliceAlong__default['default'](
line,
segmentLength * i,
segmentLength * (i + 1),
{ units: units }
);
callback(outline, i);
}
}
module.exports = lineChunk;
module.exports.default = lineChunk;

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

@@ -0,0 +1,25 @@
import {
LineString,
MultiLineString,
GeometryCollection,
Units,
Feature,
FeatureCollection,
} from "@turf/helpers";
/**
* http://turfjs.org/docs/#lineChunk
*/
export default function lineChunk<T extends LineString | MultiLineString>(
geojson:
| Feature<T>
| FeatureCollection<T>
| T
| GeometryCollection
| Feature<GeometryCollection>,
segmentLength: number,
options?: {
units?: Units;
reverse?: boolean;
}
): FeatureCollection<LineString>;

71
frontend/node_modules/@turf/line-chunk/package.json generated vendored Normal file
View File

@@ -0,0 +1,71 @@
{
"name": "@turf/line-chunk",
"version": "6.5.0",
"description": "turf line-chunk module",
"author": "Turf Authors",
"contributors": [
"Tim Channell <@tcql>",
"Rowan Winsemius <@rowanwins>",
"Denis Carriere <@DenisCarriere>",
"Daniel Pulido <@dpmcmlxxvi>"
],
"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",
"gis",
"geojson",
"linestring",
"line segment"
],
"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/helpers": "^6.5.0",
"@turf/length": "^6.5.0",
"@turf/line-slice-along": "^6.5.0",
"@turf/meta": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}