2023-09-30 22:05:22 +02:00
|
|
|
export type FlagType = "prideFlag" | "transFlag" | "nonbinaryFlag"
|
2022-08-07 18:38:22 +02:00
|
|
|
|
2022-08-07 21:12:54 +02:00
|
|
|
export type Coord = number[]
|
|
|
|
export type Coords = Coord[]
|
2022-08-07 18:38:22 +02:00
|
|
|
|
|
|
|
export interface OSMWaySource {
|
|
|
|
type: "OSMway",
|
|
|
|
wayID: number
|
|
|
|
}
|
|
|
|
|
2022-08-07 21:12:54 +02:00
|
|
|
export interface RawCoordSource {
|
|
|
|
type: "RawCoords",
|
|
|
|
coords: Coords,
|
|
|
|
}
|
|
|
|
|
2022-08-07 18:38:22 +02:00
|
|
|
export interface OSMNodeSource {
|
|
|
|
type: "OSMnodes",
|
|
|
|
nodes: number[]
|
|
|
|
}
|
|
|
|
|
2022-08-11 00:15:45 +02:00
|
|
|
export interface Source {
|
2022-08-15 15:54:18 +02:00
|
|
|
type: "news" | "official" | "proposal" | "photo" | "streetview" | "in person"
|
2022-08-11 00:15:45 +02:00
|
|
|
date: string
|
|
|
|
url?: string
|
|
|
|
}
|
|
|
|
|
2022-08-07 18:38:22 +02:00
|
|
|
export interface GeoData {
|
2022-08-07 21:12:54 +02:00
|
|
|
coords: Coords,
|
2022-08-07 18:38:22 +02:00
|
|
|
length: number // in meter
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Crossing {
|
|
|
|
id: number
|
|
|
|
name: string
|
2022-08-15 15:54:18 +02:00
|
|
|
bezirk?: number
|
|
|
|
comment?: string
|
2022-12-15 17:58:42 +01:00
|
|
|
officialName?: string
|
2022-08-15 15:54:18 +02:00
|
|
|
set?: string
|
2022-08-07 18:38:22 +02:00
|
|
|
type: FlagType
|
2022-08-11 00:15:45 +02:00
|
|
|
sources: Source[]
|
2022-08-07 21:12:54 +02:00
|
|
|
geosource: OSMWaySource | OSMNodeSource | RawCoordSource,
|
|
|
|
geo?: GeoData
|
2022-08-07 18:38:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Tags {
|
|
|
|
[key: string]: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OverpassElement {
|
|
|
|
id: number
|
|
|
|
tags: Tags
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OverPassNode extends OverpassElement {
|
|
|
|
type: "node"
|
|
|
|
lat: number
|
|
|
|
lon: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OverpassWay extends OverpassElement {
|
|
|
|
type: "way"
|
|
|
|
nodes: number[] // corresponding to OverPassNode.id
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface OverPassResponse {
|
|
|
|
version: number
|
|
|
|
generator: string
|
|
|
|
elements: (OverPassNode | OverpassWay)[]
|
|
|
|
}
|