/** * Geohash utilities for lightning strike location filtering * Based on the homeassistant-blitzortung implementation */ /** * Bounding box for geographic area */ export interface BoundingBox { minLat: number; minLon: number; maxLat: number; maxLon: number; } /** * Calculate bounding box around a point given a radius in kilometers * @param lat Latitude * @param lon Longitude * @param radiusKm Radius in kilometers * @returns Bounding box */ export declare function calculateBoundingBox(lat: number, lon: number, radiusKm: number): BoundingBox; /** * Get all geohash neighbors for a given geohash * @param hash Geohash string * @returns Array of neighbor geohashes (up to 8 neighbors) */ export declare function getGeohashNeighbors(hash: string): string[]; /** * Compute geohash tiles that overlap a circular search area * Uses breadth-first search to find all geohashes within the bounding box * @param lat Center latitude * @param lon Center longitude * @param radiusKm Search radius in kilometers * @param precision Geohash precision (1-12) * @returns Set of geohash strings that overlap the search area */ export declare function computeGeohashTiles(lat: number, lon: number, radiusKm: number, precision: number): Set; /** * Calculate optimal geohash tiles for MQTT subscription * Selects the coarsest precision that keeps the tile count at or below maxTiles * This balances spatial granularity against subscription overhead * * @param lat Center latitude * @param lon Center longitude * @param radiusKm Search radius in kilometers * @param maxTiles Maximum number of tiles (default 9, as used by homeassistant-blitzortung) * @returns Set of geohash strings to subscribe to */ export declare function calculateGeohashSubscriptions(lat: number, lon: number, radiusKm: number, maxTiles?: number): Set; /** * Check if a point is within a radius of a center point * Uses Haversine formula for great-circle distance * * @param centerLat Center latitude * @param centerLon Center longitude * @param pointLat Point latitude * @param pointLon Point longitude * @param radiusKm Radius in kilometers * @returns true if point is within radius */ export declare function isWithinRadius(centerLat: number, centerLon: number, pointLat: number, pointLon: number, radiusKm: number): boolean; //# sourceMappingURL=geohash.d.ts.map