120 lines
1.9 KiB
TypeScript
120 lines
1.9 KiB
TypeScript
|
interface Gpx {
|
||
|
$: Gpx_;
|
||
|
metadata?: Metadata;
|
||
|
wpt?: Wpt[];
|
||
|
rte?: Rte[];
|
||
|
trk?: Trk[];
|
||
|
extensions?: Extensions;
|
||
|
}
|
||
|
|
||
|
interface Gpx_ {
|
||
|
version: '1.1';
|
||
|
creator: string;
|
||
|
xmlns: 'http://www.topografix.com/GPX/1/1';
|
||
|
'xmlns:xsi'?: 'http://www.w3.org/2001/XMLSchema-instance';
|
||
|
'xsi:schemaLocation'?: string;
|
||
|
'xmlns:gpxx'?: string;
|
||
|
'xmlns:wptx1'?: string;
|
||
|
'xmlns:gpxtpx'?: string;
|
||
|
'xmlns:dyo'?: 'http://xmlns.dyomedea.com/';
|
||
|
}
|
||
|
|
||
|
interface Metadata {
|
||
|
name?: string;
|
||
|
desc?: string;
|
||
|
author?: string;
|
||
|
copyright?: string;
|
||
|
link?: Link[];
|
||
|
time?: string;
|
||
|
keywords?: string;
|
||
|
bounds?: Bounds;
|
||
|
extensions?: Extensions;
|
||
|
}
|
||
|
|
||
|
interface Bounds {
|
||
|
$: Bounds_;
|
||
|
}
|
||
|
|
||
|
interface Bounds_ {
|
||
|
minlat: number;
|
||
|
minlon: number;
|
||
|
maxlat: number;
|
||
|
maxlon: number;
|
||
|
}
|
||
|
|
||
|
interface Extensions {
|
||
|
'dyo:speed'?: number;
|
||
|
'dyo:course'?: number;
|
||
|
'dyo:accuracy'?: number;
|
||
|
'dyo:batterylevel'?: number;
|
||
|
'dyo:useragent'?: string;
|
||
|
}
|
||
|
|
||
|
interface Trk {
|
||
|
name?: string;
|
||
|
cmt?: string;
|
||
|
desc?: string;
|
||
|
src?: string;
|
||
|
link?: Link[];
|
||
|
number?: number;
|
||
|
type?: string;
|
||
|
extensions?: Extensions;
|
||
|
trkseg?: Trkseg[];
|
||
|
}
|
||
|
|
||
|
interface Link {
|
||
|
$: Link_;
|
||
|
text?: string;
|
||
|
type?: string;
|
||
|
}
|
||
|
|
||
|
interface Link_ {
|
||
|
href: string;
|
||
|
}
|
||
|
|
||
|
interface Trkseg {
|
||
|
trkpt?: Wpt[];
|
||
|
extensions?: Extensions;
|
||
|
}
|
||
|
|
||
|
interface Wpt {
|
||
|
$: Wpt_;
|
||
|
ele?: number;
|
||
|
time?: string;
|
||
|
magvar?: number;
|
||
|
geoidheight?: number;
|
||
|
name?: string;
|
||
|
cmt?: string;
|
||
|
desc?: string;
|
||
|
src?: string;
|
||
|
link?: Link;
|
||
|
sym?: string;
|
||
|
type?: string;
|
||
|
fix?: string;
|
||
|
sat?: number;
|
||
|
hdop?: number;
|
||
|
vdop?: number;
|
||
|
pdop?: number;
|
||
|
ageofdgpsdata?: number;
|
||
|
dgpsid?: number;
|
||
|
extensions?: Extensions;
|
||
|
}
|
||
|
|
||
|
interface Wpt_ {
|
||
|
lat: number;
|
||
|
lon: number;
|
||
|
}
|
||
|
|
||
|
interface Rte {
|
||
|
name?: string;
|
||
|
cmt?: string;
|
||
|
desc?: string;
|
||
|
src?: string;
|
||
|
link?: Link[];
|
||
|
number?: number;
|
||
|
type?: string;
|
||
|
extensions?: Extensions;
|
||
|
rtept?: Wpt[];
|
||
|
}
|
||
|
|