UNPKG

@gooin/fit2spatial

Version:

Convert Garmin FIT files to GeoJSON, SHP, KML, GPX

17 lines (16 loc) 686 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.eventToSHP = exports.convertGeoJSONToSHP = void 0; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const geojson2shp_1 = require("geojson2shp"); const geojson_1 = require("./geojson"); const convertGeoJSONToSHP = async (geoJSON, output) => { await (0, geojson2shp_1.convert)(geoJSON, output); }; exports.convertGeoJSONToSHP = convertGeoJSONToSHP; const eventToSHP = async (event, output) => { const json = (0, geojson_1.exportToGeoJSONLineString)(event); await (0, exports.convertGeoJSONToSHP)(json, output); }; exports.eventToSHP = eventToSHP;