1
0
Fork 0
mirror of https://github.com/Findus23/RainbowRoad.git synced 2024-09-19 16:03:52 +02:00

more data

This commit is contained in:
Lukas Winkler 2022-08-07 21:12:54 +02:00
parent 4918bcd59b
commit 5c8f2c9485
Signed by: lukas
GPG key ID: 54DE4D798D244853
10 changed files with 942 additions and 33 deletions

View file

@ -50,7 +50,9 @@ async function runfetch() {
}
for (const d of data) {
if (typeof d.geo !== "undefined") {
d.geo.length = lineLengthInM(d.geo.coords[0], d.geo.coords[1])
continue
}
const geosource = d.geosource
@ -63,14 +65,16 @@ async function runfetch() {
case "OSMnodes":
coords = await fetchNodeData(geosource);
break
case "RawCoords":
coords = geosource.coords
console.info(geosource.coords)
break
}
d.geo = {
coords: coords,
length: lineLengthInM(coords[0], coords[1])
}
// crossings[i] = d
d.geo.length = lineLengthInM(d.geo.coords[0], d.geo.coords[1])
}

View file

@ -30,7 +30,7 @@
48.217809
]
],
"length": 30.88
"length": 20.76
}
},
{
@ -61,7 +61,408 @@
48.2190409
]
],
"length": 42.77
"length": 30.58
}
},
{
"id": 3,
"name": "Gumpendorfer Straße/Kaunitzgasse",
"bezirk": 6,
"type": "prideFlag",
"comment": "dritte in Wien",
"sources": [
{
"type": "official",
"url": "https://www.mariahilf.spoe.wien/regenbogen-monat/regenbogen-zebrastreifen/",
"date": "2020-06-16"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
2592758282,
2592758289,
2592758298
]
},
"geo": {
"coords": [
[
16.354169,
48.1976139
],
[
16.3541143,
48.1977524
]
],
"length": 15.93
}
},
{
"id": 4,
"name": "Schönbrunner Straße/Pilgramgasse",
"bezirk": 5,
"type": "prideFlag",
"sources": [
{
"type": "official",
"url": "https://www.margareten.spoe.wien/2020/09/14/margareten-bekommt-den-1-regenbogen-zebrastreifen/",
"date": "2020-09-16"
}
],
"comment": "Erster im 5. Bezirk",
"geosource": {
"type": "OSMnodes",
"nodes": [
2592738844,
1361284702,
2592738857
]
},
"geo": {
"coords": [
[
16.3564331,
48.1919498
],
[
16.3565701,
48.1920867
]
],
"length": 18.3
}
},
{
"id": 5,
"name": "Burgtheater/Rathausplatz",
"bezirk": 1,
"type": "prideFlag",
"comment": "erster in Wien",
"sources": [
{
"type": "news",
"url": "https://www.derstandard.at/story/2000104455943/wiener-zebrastreifen-erstrahlt-als-regenbogen",
"date": "2019-06-06"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
1958327004,
715774888,
1958327005,
4683382974
]
},
"geo": {
"coords": [
[
16.3607486,
48.2105078
],
[
16.3605668,
48.2105315
]
],
"length": 13.73
}
},
{
"id": 6,
"name": "Meidlinger Markt",
"bezirk": 12,
"type": "prideFlag",
"sources": [
{
"type": "news",
"url": "https://kurier.at/chronik/wien/zwei-neue-regenbogen-schutzwege-nur-einer-steht-fuer-toleranz/401329509",
"date": "2021-03-23"
}
],
"geosource": {
"type": "RawCoords",
"coords": [
[
16.33268,
48.18118
],
[
16.33268,
48.18129
]
]
},
"geo": {
"coords": [
[
16.33268,
48.18118
],
[
16.33268,
48.18129
]
],
"length": 12.23
}
},
{
"id": 7,
"name": "Laaer-Berg-Straße",
"bezirk": 12,
"type": "prideFlag",
"sources": [
{
"type": "news",
"url": "https://kurier.at/chronik/wien/zwei-neue-regenbogen-schutzwege-nur-einer-steht-fuer-toleranz/401329509",
"date": "2021-03-23"
},
{
"type": "news",
"url": "https://www.vienna.at/regenbogen-zebrastreifen-fuer-mehr-sicherheit-vor-volksschule-laaer-berg/6936217",
"date": "2021-03-23"
}
],
"comment": "\"Farbenfroh\", um \"den Schulweg für die Schülerinnen und Schüler so sicher wie möglich zu gestalten\"",
"geosource": {
"type": "RawCoords",
"coords": [
[
16.39615,
48.15504
],
[
16.396,
48.15501
]
]
},
"geo": {
"coords": [
[
16.39615,
48.15504
],
[
16.396,
48.15501
]
],
"length": 11.62
}
},
{
"id": 8,
"name": "Währinger Straße/Kutschkermarkt",
"bezirk": 18,
"type": "prideFlag",
"comment": "Zweiter in Wien",
"sources": [
{
"type": "news",
"url": "https://www.ggg.at/2020/05/27/wien-waehring-hat-seinen-ersten-regenbogen-zebrastreifen/",
"date": "2020-05-27"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
4759873241,
251207332,
4070298580,
2423479553,
4070298581,
4759873240,
4759873233
]
},
"geo": {
"coords": [
[
16.3447646,
48.2261005
],
[
16.3447848,
48.2262367
]
],
"length": 15.22
}
},
{
"id": 9,
"name": "Landstraßer Hauptstraße",
"bezirk": 3,
"type": "prideFlag",
"sources": [
{
"type": "news",
"url": "https://kurier.at/chronik/wien/neuer-regenbogen-zebrastreifen-im-3-bezirk/401024645",
"date": "2020-09-09"
}
],
"comment": "Vierte in Wien",
"geosource": {
"type": "OSMway",
"wayID": 492141776
},
"geo": {
"coords": [
[
16.3876052,
48.2050736
],
[
16.3874681,
48.2049374
]
],
"length": 18.24
}
},
{
"id": 10,
"name": "Operngasse/Schleifmühlgasse",
"bezirk": 4,
"type": "prideFlag",
"sources": [
{
"type": "news",
"url": "https://wienerbezirksblatt.at/ein-regenbogenzebrastreifen-fuer-die-wieden/",
"date": "2021-06-21"
}
],
"geosource": {
"type": "RawCoords",
"coords": [
[
16.36562,
48.19704
],
[
16.3657,
48.19697
]
]
},
"geo": {
"coords": [
[
16.36562,
48.19704
],
[
16.3657,
48.19697
]
],
"length": 9.78
}
},
{
"id": 11,
"name": "Schönbrunner Straße/Ramperstorffergasse",
"bezirk": 5,
"type": "transFlag",
"sources": [
{
"type": "news",
"url": "https://www.meinbezirk.at/margareten/c-politik/margaretens-erster-trans-pride-schutzweg-ist-eroeffnet_a4706615",
"date": "2021-06-15"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
3724714788,
3724714740,
1352578195,
3724714760
]
},
"geo": {
"coords": [
[
16.3547176,
48.190631
],
[
16.3549009,
48.1907098
]
],
"length": 16.17
}
},
{
"id": 12,
"name": "Kennedybrücke/Hietzinger Hauptstraße",
"bezirk": 13,
"type": "prideFlag",
"sources": [
{
"type": "news",
"url": "https://www.meinbezirk.at/hietzing/c-lokales/der-13-bezirk-hat-seinen-ersten-regenbogen-zebrastreifen_a5051167#gallery=null",
"date": "2021-12-07"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
2971124930,
26970481,
251708631
]
},
"geo": {
"coords": [
[
16.3035692,
48.1873011
],
[
16.3035488,
48.1874442
]
],
"length": 15.98
}
},
{
"id": 13,
"name": "Kennedybrücke/Hadikgasse",
"bezirk": 14,
"type": "prideFlag",
"sources": [
{
"type": "streetview",
"date": "2021-12-01"
}
],
"geosource": {
"type": "OSMnodes",
"nodes": [
3252467172,
2003097464,
2003097460
]
},
"geo": {
"coords": [
[
16.3040589,
48.1882864
],
[
16.3040479,
48.1881693
]
],
"length": 13.05
}
}
]
]

View file

@ -5,6 +5,57 @@
"$ref": "#/definitions/crossing"
},
"definitions": {
"Coordinate": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "number"
}
},
"Coordinates": {
"type": "array",
"items": {
"$ref": "#/definitions/Coordinate"
}
},
"RawCoordSource": {
"type": "object",
"properties": {
"type": {
"const": "RawCoords"
},
"coords": {
"$ref": "#/definitions/Coordinates"
}
}
},
"OSMNodeSource": {
"type": "object",
"properties": {
"type": {
"const": "OSMnodes"
},
"nodes": {
"type": "array",
"minItems": 2,
"items": {
"type": "number"
}
}
}
},
"OSMWaySource": {
"type": "object",
"properties": {
"type": {
"const": "OSMway"
},
"wayID": {
"type": "number"
}
}
},
"source": {
"type": "object",
"additionalProperties": false,
@ -13,17 +64,16 @@
"type": "string",
"enum": [
"news",
"official",
"streetview",
"in person"
]
},
"date": {
"type": "string",
"format": "date"
"type": "string"
},
"url": {
"type": "string",
"format": "url"
"type": "string"
}
},
"required": [
@ -39,13 +89,7 @@
"type": "integer"
},
"coords": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
"$ref": "#/definitions/Coordinates"
},
"length": {
"type": "number"
@ -65,12 +109,16 @@
"bezirk": {
"type": "integer"
},
"comment": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/source"
}
"$ref": "#/definitions/source"
},
"minItems": 1
},
"type": {
"type": "string",
@ -81,15 +129,29 @@
},
"geo": {
"type": "object",
"$ref": "#/geo"
"$ref": "#/definitions/geo"
},
"geosource": {}
"geosource": {
"oneOf": [
{
"$ref": "#/definitions/OSMWaySource"
},
{
"$ref": "#/definitions/OSMNodeSource"
},
{
"$ref": "#/definitions/RawCoordSource"
}
]
}
},
"required": [
"id",
"bezirk",
"name",
"type"
"type",
"sources",
"geosource"
],
"title": "Zebrastreifen"
}

View file

@ -1,18 +1,25 @@
export type FlagType = "prideFlag" | "transFlag"
export type Coord = number[]
export type Coords = Coord[]
export interface OSMWaySource {
type: "OSMway",
wayID: number
}
export interface RawCoordSource {
type: "RawCoords",
coords: Coords,
}
export interface OSMNodeSource {
type: "OSMnodes",
nodes: number[]
}
export interface GeoData {
coords: number[][],
coords: Coords,
length: number // in meter
}
@ -21,8 +28,8 @@ export interface Crossing {
name: string
bezirk: number
type: FlagType
geosource: OSMWaySource | OSMNodeSource,
geo: GeoData
geosource: OSMWaySource | OSMNodeSource | RawCoordSource,
geo?: GeoData
}
export interface Tags {

421
package-lock.json generated
View file

@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"ajv-cli": "^5.0.0",
"axios": "^0.27.2",
"node-fetch": "^3.2.10",
"ol": "^6.14.1",
@ -141,11 +142,59 @@
"node": ">=0.4.0"
}
},
"node_modules/ajv": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ajv-cli": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz",
"integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==",
"dependencies": {
"ajv": "^8.0.0",
"fast-json-patch": "^2.0.0",
"glob": "^7.1.0",
"js-yaml": "^3.14.0",
"json-schema-migrate": "^2.0.0",
"json5": "^2.1.3",
"minimist": "^1.2.0"
},
"bin": {
"ajv": "dist/index.js"
},
"peerDependencies": {
"ts-node": ">=9.0.0"
},
"peerDependenciesMeta": {
"ts-node": {
"optional": true
}
}
},
"node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="
},
"node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dependencies": {
"sprintf-js": "~1.0.2"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -160,6 +209,20 @@
"form-data": "^4.0.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -171,6 +234,11 @@
"node": ">= 0.8"
}
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@ -560,6 +628,39 @@
"node": ">=12"
}
},
"node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"node_modules/fast-json-patch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz",
"integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==",
"dependencies": {
"fast-deep-equal": "^2.0.1"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/fast-json-patch/node_modules/fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w=="
},
"node_modules/fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
@ -625,6 +726,11 @@
"node": ">=12.20.0"
}
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
@ -663,6 +769,25 @@
"node": ">=10.19"
}
},
"node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@ -694,6 +819,20 @@
}
]
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/is-core-module": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
@ -706,11 +845,47 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/json-schema-migrate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz",
"integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==",
"dependencies": {
"ajv": "^8.0.0"
}
},
"node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
},
"node_modules/json-stringify-pretty-compact": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz",
"integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ=="
},
"node_modules/json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/lerc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz",
@ -756,6 +931,17 @@
"node": ">= 0.6"
}
},
"node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
@ -832,6 +1018,14 @@
"mapbox-to-css-font": "^2.4.1"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/pako": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
@ -842,6 +1036,14 @@
"resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz",
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA=="
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@ -895,6 +1097,14 @@
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"engines": {
"node": ">=6"
}
},
"node_modules/quickselect": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
@ -908,6 +1118,14 @@
"quickselect": "^2.0.0"
}
},
"node_modules/require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
@ -990,6 +1208,11 @@
"node": ">=0.10.0"
}
},
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@ -1056,6 +1279,14 @@
"node": ">=4.2.0"
}
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dependencies": {
"punycode": "^2.1.0"
}
},
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
@ -1115,6 +1346,11 @@
"resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz",
"integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA=="
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/xml-utils": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.2.0.tgz",
@ -1232,11 +1468,44 @@
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA=="
},
"ajv": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
"requires": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2",
"uri-js": "^4.2.2"
}
},
"ajv-cli": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ajv-cli/-/ajv-cli-5.0.0.tgz",
"integrity": "sha512-LY4m6dUv44HTyhV+u2z5uX4EhPYTM38Iv1jdgDJJJCyOOuqB8KtZEGjPZ2T+sh5ZIJrXUfgErYx/j3gLd3+PlQ==",
"requires": {
"ajv": "^8.0.0",
"fast-json-patch": "^2.0.0",
"glob": "^7.1.0",
"js-yaml": "^3.14.0",
"json-schema-migrate": "^2.0.0",
"json5": "^2.1.3",
"minimist": "^1.2.0"
}
},
"arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -1251,6 +1520,20 @@
"form-data": "^4.0.0"
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -1259,6 +1542,11 @@
"delayed-stream": "~1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
@ -1452,6 +1740,31 @@
"dev": true,
"optional": true
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-json-patch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz",
"integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==",
"requires": {
"fast-deep-equal": "^2.0.1"
},
"dependencies": {
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w=="
}
}
},
"fetch-blob": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
@ -1484,6 +1797,11 @@
"fetch-blob": "^3.1.2"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
@ -1511,6 +1829,19 @@
"xml-utils": "^1.0.2"
}
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@ -1525,6 +1856,20 @@
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-core-module": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
@ -1534,11 +1879,38 @@
"has": "^1.0.3"
}
},
"js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"json-schema-migrate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz",
"integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==",
"requires": {
"ajv": "^8.0.0"
}
},
"json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
},
"json-stringify-pretty-compact": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz",
"integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ=="
},
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
},
"lerc": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz",
@ -1575,6 +1947,14 @@
"mime-db": "1.52.0"
}
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
@ -1621,6 +2001,14 @@
"mapbox-to-css-font": "^2.4.1"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"pako": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
@ -1631,6 +2019,11 @@
"resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz",
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA=="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@ -1668,6 +2061,11 @@
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"quickselect": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
@ -1681,6 +2079,11 @@
"quickselect": "^2.0.0"
}
},
"require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="
},
"resolve": {
"version": "1.22.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
@ -1739,6 +2142,11 @@
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"dev": true
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@ -1770,6 +2178,14 @@
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ=="
},
"uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"requires": {
"punycode": "^2.1.0"
}
},
"v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
@ -1798,6 +2214,11 @@
"resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz",
"integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA=="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"xml-utils": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.2.0.tgz",

View file

@ -6,7 +6,8 @@
"fetch": "cd commands && ts-node fetch.ts",
"dev": "vite",
"build": "tsc --skipLibCheck && vite build",
"preview": "vite preview"
"preview": "vite preview",
"validate": "ajv validate -s data/schema.json -d data/data.json"
},
"devDependencies": {
"@types/node": "^18.6.3",
@ -14,6 +15,7 @@
"vite": "^3.0.2"
},
"dependencies": {
"ajv-cli": "^5.0.0",
"axios": "^0.27.2",
"node-fetch": "^3.2.10",
"ol": "^6.14.1",

2
publish.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
rsync -rvzP ./dist/ lukas@lw1.at:/var/www/static/tmp/rainbowroad/ --fuzzy --delete-after -v

View file

@ -12,7 +12,10 @@ import {Coordinate} from "ol/coordinate";
import {State} from "ol/render";
import {Line, Vector2d} from "./vectorUtils";
import {drawZebraCrossing, zebraPatterns} from "./zebraUtils";
import importdata from "../data/data.json"
// @ts-ignore
import importdata from "../data/data.json?inline"
// @ts-ignore
import dataURL from "../data/data.json?url"
import {Crossing} from "../interfaces";
import prideFlag from "../assets/prideflag.svg"
import transFlag from "../assets/transflag.svg"
@ -47,9 +50,14 @@ const map = new Map({
constrainOnlyCenter: true
})
});
var vectorLine = new VectorSource({});
var vectorLine = new VectorSource({
attributions: ["<a target='_blank' href='" + dataURL + "'>Rohdaten</a>"]
});
const metaData: { [id: number]: Crossing } = {}
data.forEach(c => {
if (typeof c.geo === "undefined") {
return
}
const points = c.geo.coords.map(coord => transform(coord, 'EPSG:4326', 'EPSG:3857'));
const featureLine = new Feature({
@ -82,7 +90,7 @@ function renderer(coordinates: Coordinate | Coordinate[] | Coordinate[][], state
return
}
const crossing = metaData[featureID]
let numStripes = crossing.geo.length / 0.5
let numStripes = crossing.geo!.length / 0.5
if (state.resolution > 0.3) {
numStripes /= 2
}
@ -186,4 +194,4 @@ map.on('singleclick', function (event) {
closer.blur();
}
});
console.log(dataURL)

View file

@ -5,10 +5,10 @@ function toRad(val: number) {
}
export function lineLengthInM(start: number[], end: number[]) {
let lat1 = start[0]
let lat2 = end[0]
const lon1 = start[1]
const lon2 = end[1]
let lat1 = start[1]
let lat2 = end[1]
const lon1 = start[0]
const lon2 = end[0]
let dLat = toRad(lat2 - lat1)
let dLon = toRad(lon2 - lon1)

View file

@ -5,7 +5,9 @@ export default defineConfig({
// splitVendorChunkPlugin(),
// visualizer(),
],
base: "",
build: {
sourcemap: true,
rollupOptions: {
input: {
"index": 'index.html',