UNPKG

svelte-local-gpx-viewer

Version:

Local-first GPX routes viewer. Svelte-based components. Useable in Svelte projects and standalone (vanilla JS).

37 lines (36 loc) 1.07 kB
import type { Feature, FeatureCollection } from 'geojson'; /** * Smooth the elevation data of coordinates. */ export declare function smoothElevations(coords: number[][], windowSize?: number): number[][]; /** * Calculate positive and negative elevation changes. */ export declare function calculateElevation(feature: Feature, threshold?: number): { positive: number; negative: number; }; /** * Generate a random color. */ export declare function getRandomColor(): string; /** * Get the bounding box of GeoJSON features. */ export declare function getBoundingBox(geojson_feats: GeoJSON.Feature[]): [number, number, number, number]; /** * Parse FIT file and convert it to GeoJSON. */ export declare function parseFitToGeoJSON(fitData: ArrayBuffer): FeatureCollection; export declare function prepareRoutesFromFiles(files: FileList): Promise<{ name: string; data: any; distance: number; elevation: { positive: number; negative: number; }; visible: boolean; originalGPXData: string | null; color: string; }[]>;