/** * Multi-Service Geocoding Service * Implements automatic fallback strategy across multiple geocoding providers * for maximum reliability and coverage */ /** * Serialize query parameters using RFC 3986 percent-encoding (spaces -> %20). * * Axios's default serializer encodes spaces as "+" (application/x-www-form-urlencoded * style). Nominatim treats such "+"-encoded queries inconsistently — notably it can * return ZERO matches at limit=1 for a query that returns matches with %20 encoding * (e.g. "Clare, MI"). Forcing %20 keeps geocoding results stable across providers and * result limits. Shared by every provider client below. */ export declare function rfc3986ParamsSerializer(params: Record): string; /** * Geocoding result with standardized format across all providers */ export interface GeocodingResult { name: string; display_name: string; latitude: number; longitude: number; country?: string; country_code?: string; admin1?: string; admin2?: string; timezone?: string; elevation?: number | null; population?: number | null; feature_code?: string; confidence: 'high' | 'medium' | 'low'; source: 'census' | 'nominatim' | 'openmeteo'; } /** * Multi-Service Geocoding Service * Automatically tries multiple providers in order with intelligent fallback */ export declare class GeocodingService { private census; private nominatim; private openmeteo; constructor(); /** * Detect if query is likely a US location * Helps optimize provider selection */ private isLikelyUSLocation; /** * Geocode a location query with automatic multi-service fallback * * Strategy: * 1. If likely US: Try Census.gov first (fast, authoritative) * 2. Try Nominatim (worldwide, good natural language support) * 3. Fallback to Open-Meteo (reliable, detailed metadata) * * @param query - Location search query (e.g., "Seattle, WA", "Paris, France") * @param limit - Maximum number of results to return * @returns Array of geocoding results from first successful provider */ geocode(query: string, limit?: number): Promise; /** * Get service information for debugging */ getServiceInfo(): string; } //# sourceMappingURL=geocoding.d.ts.map