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/point-on-feature/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.

73
frontend/node_modules/@turf/point-on-feature/README.md generated vendored Normal file
View File

@@ -0,0 +1,73 @@
# @turf/point-on-feature
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## pointOnFeature
Takes a Feature or FeatureCollection and returns a [Point][1] guaranteed to be on the surface of the feature.
- Given a [Polygon][2], the point will be in the area of the polygon
- Given a [LineString][3], the point will be along the string
- Given a [Point][1], the point will the same as the input
**Parameters**
- `geojson` **[GeoJSON][4]** any Feature or FeatureCollection
**Examples**
```javascript
var polygon = turf.polygon([[
[116, -36],
[131, -32],
[146, -43],
[155, -25],
[133, -9],
[111, -22],
[116, -36]
]]);
var pointOnPolygon = turf.pointOnFeature(polygon);
//addToMap
var addToMap = [polygon, pointOnPolygon];
```
Returns **[Feature][5]&lt;[Point][6]>** a point on the surface of `input`
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[4]: https://tools.ietf.org/html/rfc7946#section-3
[5]: https://tools.ietf.org/html/rfc7946#section-3.2
[6]: 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/point-on-feature
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

149
frontend/node_modules/@turf/point-on-feature/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,149 @@
import explode from '@turf/explode';
import centroid from '@turf/center';
import nearestPoint from '@turf/nearest-point';
import booleanPointInPolygon from '@turf/boolean-point-in-polygon';
import { featureCollection, point, feature } from '@turf/helpers';
/**
* Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.
*
* * Given a {@link Polygon}, the point will be in the area of the polygon
* * Given a {@link LineString}, the point will be along the string
* * Given a {@link Point}, the point will the same as the input
*
* @name pointOnFeature
* @param {GeoJSON} geojson any Feature or FeatureCollection
* @returns {Feature<Point>} a point on the surface of `input`
* @example
* var polygon = turf.polygon([[
* [116, -36],
* [131, -32],
* [146, -43],
* [155, -25],
* [133, -9],
* [111, -22],
* [116, -36]
* ]]);
*
* var pointOnPolygon = turf.pointOnFeature(polygon);
*
* //addToMap
* var addToMap = [polygon, pointOnPolygon];
*/
function pointOnFeature(geojson) {
// normalize
var fc = normalize(geojson);
// get centroid
var cent = centroid(fc);
// check to see if centroid is on surface
var onSurface = false;
var i = 0;
while (!onSurface && i < fc.features.length) {
var geom = fc.features[i].geometry;
var x, y, x1, y1, x2, y2, k;
var onLine = false;
if (geom.type === "Point") {
if (
cent.geometry.coordinates[0] === geom.coordinates[0] &&
cent.geometry.coordinates[1] === geom.coordinates[1]
) {
onSurface = true;
}
} else if (geom.type === "MultiPoint") {
var onMultiPoint = false;
k = 0;
while (!onMultiPoint && k < geom.coordinates.length) {
if (
cent.geometry.coordinates[0] === geom.coordinates[k][0] &&
cent.geometry.coordinates[1] === geom.coordinates[k][1]
) {
onSurface = true;
onMultiPoint = true;
}
k++;
}
} else if (geom.type === "LineString") {
k = 0;
while (!onLine && k < geom.coordinates.length - 1) {
x = cent.geometry.coordinates[0];
y = cent.geometry.coordinates[1];
x1 = geom.coordinates[k][0];
y1 = geom.coordinates[k][1];
x2 = geom.coordinates[k + 1][0];
y2 = geom.coordinates[k + 1][1];
if (pointOnSegment(x, y, x1, y1, x2, y2)) {
onLine = true;
onSurface = true;
}
k++;
}
} else if (geom.type === "MultiLineString") {
var j = 0;
while (j < geom.coordinates.length) {
onLine = false;
k = 0;
var line = geom.coordinates[j];
while (!onLine && k < line.length - 1) {
x = cent.geometry.coordinates[0];
y = cent.geometry.coordinates[1];
x1 = line[k][0];
y1 = line[k][1];
x2 = line[k + 1][0];
y2 = line[k + 1][1];
if (pointOnSegment(x, y, x1, y1, x2, y2)) {
onLine = true;
onSurface = true;
}
k++;
}
j++;
}
} else if (geom.type === "Polygon" || geom.type === "MultiPolygon") {
if (booleanPointInPolygon(cent, geom)) {
onSurface = true;
}
}
i++;
}
if (onSurface) {
return cent;
} else {
var vertices = featureCollection([]);
for (i = 0; i < fc.features.length; i++) {
vertices.features = vertices.features.concat(
explode(fc.features[i]).features
);
}
// Remove distanceToPoint properties from nearestPoint()
return point(nearestPoint(cent, vertices).geometry.coordinates);
}
}
/**
* Normalizes any GeoJSON to a FeatureCollection
*
* @private
* @name normalize
* @param {GeoJSON} geojson Any GeoJSON
* @returns {FeatureCollection} FeatureCollection
*/
function normalize(geojson) {
if (geojson.type !== "FeatureCollection") {
if (geojson.type !== "Feature") {
return featureCollection([feature(geojson)]);
}
return featureCollection([geojson]);
}
return geojson;
}
function pointOnSegment(x, y, x1, y1, x2, y2) {
var ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
var ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
var pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
return ab === ap + pb;
}
export default pointOnFeature;

View File

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

159
frontend/node_modules/@turf/point-on-feature/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,159 @@
'use strict';
var explode = require('@turf/explode');
var centroid = require('@turf/center');
var nearestPoint = require('@turf/nearest-point');
var booleanPointInPolygon = require('@turf/boolean-point-in-polygon');
var helpers = require('@turf/helpers');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var explode__default = /*#__PURE__*/_interopDefaultLegacy(explode);
var centroid__default = /*#__PURE__*/_interopDefaultLegacy(centroid);
var nearestPoint__default = /*#__PURE__*/_interopDefaultLegacy(nearestPoint);
var booleanPointInPolygon__default = /*#__PURE__*/_interopDefaultLegacy(booleanPointInPolygon);
/**
* Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.
*
* * Given a {@link Polygon}, the point will be in the area of the polygon
* * Given a {@link LineString}, the point will be along the string
* * Given a {@link Point}, the point will the same as the input
*
* @name pointOnFeature
* @param {GeoJSON} geojson any Feature or FeatureCollection
* @returns {Feature<Point>} a point on the surface of `input`
* @example
* var polygon = turf.polygon([[
* [116, -36],
* [131, -32],
* [146, -43],
* [155, -25],
* [133, -9],
* [111, -22],
* [116, -36]
* ]]);
*
* var pointOnPolygon = turf.pointOnFeature(polygon);
*
* //addToMap
* var addToMap = [polygon, pointOnPolygon];
*/
function pointOnFeature(geojson) {
// normalize
var fc = normalize(geojson);
// get centroid
var cent = centroid__default['default'](fc);
// check to see if centroid is on surface
var onSurface = false;
var i = 0;
while (!onSurface && i < fc.features.length) {
var geom = fc.features[i].geometry;
var x, y, x1, y1, x2, y2, k;
var onLine = false;
if (geom.type === "Point") {
if (
cent.geometry.coordinates[0] === geom.coordinates[0] &&
cent.geometry.coordinates[1] === geom.coordinates[1]
) {
onSurface = true;
}
} else if (geom.type === "MultiPoint") {
var onMultiPoint = false;
k = 0;
while (!onMultiPoint && k < geom.coordinates.length) {
if (
cent.geometry.coordinates[0] === geom.coordinates[k][0] &&
cent.geometry.coordinates[1] === geom.coordinates[k][1]
) {
onSurface = true;
onMultiPoint = true;
}
k++;
}
} else if (geom.type === "LineString") {
k = 0;
while (!onLine && k < geom.coordinates.length - 1) {
x = cent.geometry.coordinates[0];
y = cent.geometry.coordinates[1];
x1 = geom.coordinates[k][0];
y1 = geom.coordinates[k][1];
x2 = geom.coordinates[k + 1][0];
y2 = geom.coordinates[k + 1][1];
if (pointOnSegment(x, y, x1, y1, x2, y2)) {
onLine = true;
onSurface = true;
}
k++;
}
} else if (geom.type === "MultiLineString") {
var j = 0;
while (j < geom.coordinates.length) {
onLine = false;
k = 0;
var line = geom.coordinates[j];
while (!onLine && k < line.length - 1) {
x = cent.geometry.coordinates[0];
y = cent.geometry.coordinates[1];
x1 = line[k][0];
y1 = line[k][1];
x2 = line[k + 1][0];
y2 = line[k + 1][1];
if (pointOnSegment(x, y, x1, y1, x2, y2)) {
onLine = true;
onSurface = true;
}
k++;
}
j++;
}
} else if (geom.type === "Polygon" || geom.type === "MultiPolygon") {
if (booleanPointInPolygon__default['default'](cent, geom)) {
onSurface = true;
}
}
i++;
}
if (onSurface) {
return cent;
} else {
var vertices = helpers.featureCollection([]);
for (i = 0; i < fc.features.length; i++) {
vertices.features = vertices.features.concat(
explode__default['default'](fc.features[i]).features
);
}
// Remove distanceToPoint properties from nearestPoint()
return helpers.point(nearestPoint__default['default'](cent, vertices).geometry.coordinates);
}
}
/**
* Normalizes any GeoJSON to a FeatureCollection
*
* @private
* @name normalize
* @param {GeoJSON} geojson Any GeoJSON
* @returns {FeatureCollection} FeatureCollection
*/
function normalize(geojson) {
if (geojson.type !== "FeatureCollection") {
if (geojson.type !== "Feature") {
return helpers.featureCollection([helpers.feature(geojson)]);
}
return helpers.featureCollection([geojson]);
}
return geojson;
}
function pointOnSegment(x, y, x1, y1, x2, y2) {
var ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
var ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
var pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
return ab === ap + pb;
}
module.exports = pointOnFeature;
module.exports.default = pointOnFeature;

View File

@@ -0,0 +1,6 @@
import { Feature, Point, AllGeoJSON } from "@turf/helpers";
/**
* http://turfjs.org/docs/#pointonfeature
*/
export default function pointOnFeature(geojson: AllGeoJSON): Feature<Point>;

View File

@@ -0,0 +1,65 @@
{
"name": "@turf/point-on-feature",
"version": "6.5.0",
"description": "turf point-on-feature 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",
"centroid",
"geojson",
"point",
"surface",
"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": "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"
},
"devDependencies": {
"@turf/meta": "^6.5.0",
"@turf/truncate": "^6.5.0",
"benchmark": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*"
},
"dependencies": {
"@turf/boolean-point-in-polygon": "^6.5.0",
"@turf/center": "^6.5.0",
"@turf/explode": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/nearest-point": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}