export interface CarthorseOrchestratorConfig {
    region: string;
    bbox?: [number, number, number, number];
    outputPath: string;
    stagingSchema?: string;
    noCleanup?: boolean;
    useSplitTrails?: boolean;
    minTrailLengthMeters?: number;
    usePgNodeNetwork?: boolean;
    trailheadsEnabled?: boolean;
    skipValidation?: boolean;
    verbose?: boolean;
    connectorToleranceMeters?: number;
    minDeadEndMeters?: number;
    exportConfig?: {
        includeTrails?: boolean;
        includeNodes?: boolean;
        includeEdges?: boolean;
        includeRoutes?: boolean;
    };
}
export declare class CarthorseOrchestrator {
    private pgClient;
    private config;
    readonly stagingSchema: string;
    constructor(config: CarthorseOrchestratorConfig);
    /**
     * Main entry point - generate KSP routes and export
     */
    generateKspRoutes(): Promise<void>;
    /**
     * Create staging environment
     */
    private createStagingEnvironment;
    /**
     * Copy trail data with bbox filter
     */
    private copyTrailData;
    /**
     * Create pgRouting network
     */
    private createPgRoutingNetwork;
    /**
     * Add length and elevation columns to ways_noded
     */
    private addLengthAndElevationColumns;
    /**
     * Split trails at intersections using TrailSplitter
     */
    private splitTrailsAtIntersections;
    /**
     * Generate all routes using the route generation orchestrator service
     */
    private generateAllRoutesWithService;
    /**
     * Generate analysis and export using the analysis and export service
     */
    private generateAnalysisAndExport;
    /**
     * Validate database environment (schema version, required functions)
     */
    private validateDatabaseEnvironment;
    /**
     * Validate routing network topology
     */
    private validateRoutingNetwork;
    /**
     * Cleanup staging environment
     */
    private cleanup;
    /**
     * End database connection
     */
    private endConnection;
    export(outputFormat?: 'geojson' | 'sqlite' | 'trails-only'): Promise<void>;
    private determineOutputFormat;
    private exportUsingStrategy;
    private exportToSqlite;
    private exportToGeoJSON;
    private exportTrailsOnly;
    /**
     * Static method to export production functions to a SQL file
     */
    static exportProductionFunctions(outputPath: string): Promise<void>;
    /**
     * Static method to install functions from a SQL file
     */
    static installFunctions(inputPath: string): Promise<void>;
    /**
     * Clean up duplicate edges and orphaned nodes in the routing network
     * This should be called after pgr_nodeNetwork creates the network
     */
    private cleanupRoutingNetwork;
    /**
     * Apply cached connectors from master DB (public.connector_edges) into the staging network
     */
    private applyCachedConnectors;
    /**
     * Persist newly discovered connectors from staging back to master cache (public.connector_edges)
     */
    private persistDiscoveredConnectors;
}
//# sourceMappingURL=CarthorseOrchestrator.d.ts.map