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/polygon-to-line/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.

71
frontend/node_modules/@turf/polygon-to-line/README.md generated vendored Normal file
View File

@@ -0,0 +1,71 @@
# @turf/polygon-to-line
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## polygonToLine
Converts a [Polygon][1] to [(Multi)LineString][2] or [MultiPolygon][3] to a [FeatureCollection][4] of [(Multi)LineString][2].
**Parameters**
- `poly` **[Feature][5]&lt;([Polygon][6] \| [MultiPolygon][7])>** Feature to convert
- `options` **[Object][8]** Optional parameters (optional, default `{}`)
- `options.properties` **[Object][8]** translates GeoJSON properties to Feature (optional, default `{}`)
**Examples**
```javascript
var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);
var line = turf.polygonToLine(poly);
//addToMap
var addToMap = [line];
```
Returns **([FeatureCollection][9] \| [Feature][5]&lt;([LineString][10] | MultiLinestring)>)** converted (Multi)Polygon to (Multi)LineString
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.7
[4]: https://tools.ietf.org/html/rfc7946#section-3.3
[5]: https://tools.ietf.org/html/rfc7946#section-3.2
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.7
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[9]: https://tools.ietf.org/html/rfc7946#section-3.3
[10]: https://tools.ietf.org/html/rfc7946#section-3.1.4
<!-- 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/polygon-to-line
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

75
frontend/node_modules/@turf/polygon-to-line/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,75 @@
import { featureCollection, lineString, multiLineString } from "@turf/helpers";
import { getGeom } from "@turf/invariant";
/**
* Converts a {@link Polygon} to {@link LineString|(Multi)LineString} or {@link MultiPolygon} to a
* {@link FeatureCollection} of {@link LineString|(Multi)LineString}.
*
* @name polygonToLine
* @param {Feature<Polygon|MultiPolygon>} poly Feature to convert
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] translates GeoJSON properties to Feature
* @returns {FeatureCollection|Feature<LineString|MultiLinestring>} converted (Multi)Polygon to (Multi)LineString
* @example
* var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);
*
* var line = turf.polygonToLine(poly);
*
* //addToMap
* var addToMap = [line];
*/
export default function (poly, options) {
if (options === void 0) { options = {}; }
var geom = getGeom(poly);
if (!options.properties && poly.type === "Feature") {
options.properties = poly.properties;
}
switch (geom.type) {
case "Polygon":
return polygonToLine(geom, options);
case "MultiPolygon":
return multiPolygonToLine(geom, options);
default:
throw new Error("invalid poly");
}
}
/**
* @private
*/
export function polygonToLine(poly, options) {
if (options === void 0) { options = {}; }
var geom = getGeom(poly);
var coords = geom.coordinates;
var properties = options.properties
? options.properties
: poly.type === "Feature"
? poly.properties
: {};
return coordsToLine(coords, properties);
}
/**
* @private
*/
export function multiPolygonToLine(multiPoly, options) {
if (options === void 0) { options = {}; }
var geom = getGeom(multiPoly);
var coords = geom.coordinates;
var properties = options.properties
? options.properties
: multiPoly.type === "Feature"
? multiPoly.properties
: {};
var lines = [];
coords.forEach(function (coord) {
lines.push(coordsToLine(coord, properties));
});
return featureCollection(lines);
}
/**
* @private
*/
export function coordsToLine(coords, properties) {
if (coords.length > 1) {
return multiLineString(coords, properties);
}
return lineString(coords[0], properties);
}

View File

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

View File

@@ -0,0 +1,37 @@
import { Feature, FeatureCollection, LineString, MultiLineString, MultiPolygon, Polygon, Properties } from "@turf/helpers";
/**
* Converts a {@link Polygon} to {@link LineString|(Multi)LineString} or {@link MultiPolygon} to a
* {@link FeatureCollection} of {@link LineString|(Multi)LineString}.
*
* @name polygonToLine
* @param {Feature<Polygon|MultiPolygon>} poly Feature to convert
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] translates GeoJSON properties to Feature
* @returns {FeatureCollection|Feature<LineString|MultiLinestring>} converted (Multi)Polygon to (Multi)LineString
* @example
* var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);
*
* var line = turf.polygonToLine(poly);
*
* //addToMap
* var addToMap = [line];
*/
export default function <G extends Polygon | MultiPolygon, P = Properties>(poly: Feature<G, P> | G, options?: {
properties?: any;
}): Feature<LineString | MultiLineString, P> | FeatureCollection<LineString | MultiLineString, P>;
/**
* @private
*/
export declare function polygonToLine<G extends Polygon, P = Properties>(poly: Feature<G, P> | G, options?: {
properties?: any;
}): Feature<LineString | MultiLineString, P>;
/**
* @private
*/
export declare function multiPolygonToLine<G extends MultiPolygon, P = Properties>(multiPoly: Feature<G, P> | G, options?: {
properties?: P;
}): FeatureCollection<LineString | MultiLineString, P>;
/**
* @private
*/
export declare function coordsToLine<P = Properties>(coords: number[][][], properties: P): Feature<LineString | MultiLineString, P>;

81
frontend/node_modules/@turf/polygon-to-line/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,81 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var helpers_1 = require("@turf/helpers");
var invariant_1 = require("@turf/invariant");
/**
* Converts a {@link Polygon} to {@link LineString|(Multi)LineString} or {@link MultiPolygon} to a
* {@link FeatureCollection} of {@link LineString|(Multi)LineString}.
*
* @name polygonToLine
* @param {Feature<Polygon|MultiPolygon>} poly Feature to convert
* @param {Object} [options={}] Optional parameters
* @param {Object} [options.properties={}] translates GeoJSON properties to Feature
* @returns {FeatureCollection|Feature<LineString|MultiLinestring>} converted (Multi)Polygon to (Multi)LineString
* @example
* var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);
*
* var line = turf.polygonToLine(poly);
*
* //addToMap
* var addToMap = [line];
*/
function default_1(poly, options) {
if (options === void 0) { options = {}; }
var geom = invariant_1.getGeom(poly);
if (!options.properties && poly.type === "Feature") {
options.properties = poly.properties;
}
switch (geom.type) {
case "Polygon":
return polygonToLine(geom, options);
case "MultiPolygon":
return multiPolygonToLine(geom, options);
default:
throw new Error("invalid poly");
}
}
exports.default = default_1;
/**
* @private
*/
function polygonToLine(poly, options) {
if (options === void 0) { options = {}; }
var geom = invariant_1.getGeom(poly);
var coords = geom.coordinates;
var properties = options.properties
? options.properties
: poly.type === "Feature"
? poly.properties
: {};
return coordsToLine(coords, properties);
}
exports.polygonToLine = polygonToLine;
/**
* @private
*/
function multiPolygonToLine(multiPoly, options) {
if (options === void 0) { options = {}; }
var geom = invariant_1.getGeom(multiPoly);
var coords = geom.coordinates;
var properties = options.properties
? options.properties
: multiPoly.type === "Feature"
? multiPoly.properties
: {};
var lines = [];
coords.forEach(function (coord) {
lines.push(coordsToLine(coord, properties));
});
return helpers_1.featureCollection(lines);
}
exports.multiPolygonToLine = multiPolygonToLine;
/**
* @private
*/
function coordsToLine(coords, properties) {
if (coords.length > 1) {
return helpers_1.multiLineString(coords, properties);
}
return helpers_1.lineString(coords[0], properties);
}
exports.coordsToLine = coordsToLine;

View File

@@ -0,0 +1,65 @@
{
"name": "@turf/polygon-to-line",
"version": "6.5.0",
"description": "turf polygon-to-line module",
"author": "Turf Authors",
"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",
"line",
"linestring",
"polygon"
],
"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"
},
"devDependencies": {
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}