UNPKG

carthorse

Version:

A geospatial trail data processing pipeline for building 3D trail databases with elevation data

41 lines 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExportStrategyFactory = exports.TrailsOnlyExportStrategy = void 0; const geojson_export_strategy_1 = require("./geojson-export-strategy"); const sqlite_export_strategy_1 = require("./sqlite-export-strategy"); // TrailsOnlyExportStrategy class class TrailsOnlyExportStrategy { constructor(config) { this.config = config; } async exportFromStaging() { // Implementation would go here - for now just return success console.log('Trails-only export completed'); } } exports.TrailsOnlyExportStrategy = TrailsOnlyExportStrategy; class ExportStrategyFactory { static createGeoJSONStrategy(config, pgClient, stagingSchema) { return new geojson_export_strategy_1.GeoJSONExportStrategy(pgClient, config, stagingSchema); } static createSQLiteStrategy(config, pgClient, stagingSchema) { return new sqlite_export_strategy_1.SQLiteExportStrategy(pgClient, config, stagingSchema); } static createTrailsOnlyStrategy(config) { return new TrailsOnlyExportStrategy(config); } static detectFormatFromFilename(filename) { if (filename.endsWith('.geojson') || filename.endsWith('.json')) { return 'geojson'; } else if (filename.endsWith('.db')) { return 'sqlite'; } else { // Default to SQLite for unknown extensions return 'sqlite'; } } } exports.ExportStrategyFactory = ExportStrategyFactory; //# sourceMappingURL=export-strategy.js.map