/
types.ts
112 lines (102 loc) · 1.75 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
export interface Link {
attributes: {
href: string;
};
text?: string;
type?: string;
}
export interface Person {
email?: string;
link?: Link;
name?: string;
}
export interface Copyright {
attributes: {
author: string;
};
license?: string;
year?: number;
}
export interface Bounds {
attributes: {
maxlat: number;
maxlon: number;
minlat: number;
minlon: number;
};
}
export interface Extensions {
[key: string]: { [key: string]: string | number };
}
export interface Meta {
author?: Person;
bounds?: Bounds;
copyright?: Copyright;
desc?: string;
extensions?: Extensions;
keywords?: string;
link?: Link;
name?: string;
time?: Date;
}
export interface WayPoint {
ageofdgpsdata?: number;
attributes: {
lat: number;
lon: number;
};
cmt?: string;
desc?: string;
dgpsid?: number;
ele?: number;
extensions?: Extensions;
fix?: number;
geoidheight?: number;
hdop?: number;
link?: Link;
magvar?: number;
name?: string;
pdop?: number;
sat?: number;
src?: string;
sym?: string;
time?: Date;
type?: string;
vdop?: number;
}
export interface Route {
cmt?: string;
desc?: string;
extensions?: Extensions;
link?: Link;
name?: string;
number?: number;
rtept?: WayPoint[];
src?: string;
type?: string;
}
export interface TrackSegment {
extensions?: Extensions;
trkpt: WayPoint[];
}
export interface Track {
cmt?: string;
desc?: string;
extensions?: Extensions;
link?: Link;
name?: string;
number?: number;
src?: string;
trkseg?: TrackSegment[];
type?: string;
}
export interface GPXBuildData {
attributes?: {
[key: string]: string;
};
extensions?: Extensions;
metadata?: Meta;
rte?: Route[];
trk?: Track[];
wpt?: WayPoint[];
}