@sports-alliance/sports-lib
Version:
A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc
45 lines (44 loc) • 2.35 kB
TypeScript
import { ActivityTypes } from '../activities/activity.types';
import { Creator } from '../creators/creator';
import { CreatorInterface } from '../creators/creator.interface';
import { DataPositionInterface } from '../data/data.position.interface';
import { StatsClassAbstract } from '../stats/stats.class.abstract';
import { RouteInterface } from './route.interface';
import { RouteParsingOptions } from './route-parsing-options';
import { RouteLinkInterface, RouteMetadataInterface, RoutePointInterface } from './route-point.interface';
import { RouteStreamInterface } from './route-stream.interface';
import { RouteJSONInterface } from './route.json.interface';
export declare class Route extends StatsClassAbstract implements RouteInterface {
name: string | null;
activityType: ActivityTypes | null;
comment: string | null;
description: string | null;
number: number | null;
links: RouteLinkInterface[];
extensions?: unknown;
creator: CreatorInterface;
parseOptions: RouteParsingOptions;
private streams;
private points;
constructor(creator?: Creator, options?: RouteParsingOptions, name?: string | null, activityType?: ActivityTypes | null, points?: RoutePointInterface[], metadata?: RouteMetadataInterface);
createStream(type: string, length?: number): RouteStreamInterface;
addDataToStream(type: string, index: number, value: number): this;
addStream(stream: RouteStreamInterface): this;
addStreams(streams: RouteStreamInterface[]): this;
clearStreams(): this;
removeStream(streamType: string | RouteStreamInterface): this;
replaceStreamData(streamType: string, data: (number | null)[]): this;
getAllStreams(): RouteStreamInterface[];
getAllExportableStreams(): RouteStreamInterface[];
getStream(streamType: string): RouteStreamInterface;
hasStreamData(streamType: string | RouteStreamInterface): boolean;
getStreamData(streamType: string | RouteStreamInterface): (number | null)[];
getSquashedStreamData(streamType: string): number[];
hasPositionData(): boolean;
getPositionData(): (DataPositionInterface | null)[];
getSquashedPositionData(): DataPositionInterface[];
getPointData(): RoutePointInterface[];
setPoints(points: RoutePointInterface[]): this;
getPointCount(): number;
toJSON(): RouteJSONInterface;
}