UNPKG

carthorse

Version:

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

65 lines 1.73 kB
import { Pool } from 'pg'; export interface SQLiteExportConfig { region: string; outputPath: string; includeNodes?: boolean; includeEdges?: boolean; includeTrails?: boolean; includeRecommendations?: boolean; verbose?: boolean; } export interface SQLiteExportResult { trailsExported: number; nodesExported: number; edgesExported: number; recommendationsExported?: number; routeTrailsExported?: number; dbSizeMB: number; isValid: boolean; errors: string[]; } export declare class SQLiteExportStrategy { private pgClient; private config; private stagingSchema; constructor(pgClient: Pool, config: SQLiteExportConfig, stagingSchema: string); private log; /** * Export all data from staging schema to SQLite */ exportFromStaging(): Promise<SQLiteExportResult>; /** * Create SQLite tables */ private createSqliteTables; /** * Export trails from staging schema */ private exportTrails; /** * Export nodes from staging schema (using ways_noded_vertices_pgr) */ private exportNodes; /** * Export edges from staging schema (using ways_noded with simplification) * Also cleans up orphaned nodes as part of the same atomic operation */ private exportEdges; /** * Export recommendations from staging schema */ private exportRecommendations; /** * Export route_trails from staging schema */ private exportRouteTrails; /** * Insert region metadata */ private insertRegionMetadata; /** * Insert schema version */ private insertSchemaVersion; } //# sourceMappingURL=sqlite-export-strategy.d.ts.map