Files
gpx.studio/gpx/src/types.ts

60 lines
935 B
TypeScript
Raw Normal View History

2024-04-15 14:26:34 +02:00
export type GPXFile = {
creator: string;
metadata: Metadata;
waypoints: Waypoint[];
tracks: Track[];
};
export type Metadata = {
name?: string;
desc?: string;
author?: Author;
link?: Link;
time?: Date;
};
export type Link = {
href: string;
text?: string;
type?: string;
};
export type Waypoint = {
lat: number;
lon: number;
ele?: number;
time?: Date;
name?: string;
cmt?: string;
desc?: string;
link?: Link;
sym?: string;
type?: string;
};
export type Track = {
name?: string;
cmt?: string;
desc?: string;
src?: string;
link?: Link;
type?: string;
trkseg: TrackSegment[];
};
export type TrackSegment = {
trkpt: TrackPoint[];
};
export type TrackPoint = {
lat: number;
lon: number;
ele?: number;
time?: Date;
};
export type Author = {
name?: string;
email?: string;
link?: Link;
};