43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import { Repository, DataSource } from 'typeorm';
|
|
import { NeighborhoodPoint } from './entities/neighborhood-point.entity';
|
|
import { NeighborhoodPolygon } from './entities/neighborhood-polygon.entity';
|
|
import { AdminBoundary } from './entities/admin-boundary.entity';
|
|
export declare class AdministrativeLinkingService {
|
|
private dataSource;
|
|
private readonly neighborhoodPointRepo;
|
|
private readonly neighborhoodPolygonRepo;
|
|
private readonly adminBoundaryRepo;
|
|
private readonly logger;
|
|
constructor(dataSource: DataSource, neighborhoodPointRepo: Repository<NeighborhoodPoint>, neighborhoodPolygonRepo: Repository<NeighborhoodPolygon>, adminBoundaryRepo: Repository<AdminBoundary>);
|
|
private readonly overpassMirrors;
|
|
private fetchWithRetry;
|
|
syncOsmNeighborhoodPoints(bbox?: string, country?: string): Promise<{
|
|
detected_country: string;
|
|
osm_fetched: any;
|
|
country_points: number;
|
|
total_points_in_db: number;
|
|
linked_to_district: number;
|
|
}>;
|
|
generateVoronoiNeighborhoods(country?: string): Promise<{
|
|
status: string;
|
|
country: string;
|
|
total_polygons: number;
|
|
districts_processed: any;
|
|
}>;
|
|
linkPlaces(country: 'jordan' | 'syria' | 'egypt'): Promise<{
|
|
status: string;
|
|
country: "syria" | "jordan" | "egypt";
|
|
total_places: number;
|
|
linked_neighborhood: number;
|
|
linked_district: number;
|
|
linked_governorate: number;
|
|
sample_masoum: any;
|
|
rows_affected: any;
|
|
} | {
|
|
status: string;
|
|
error: string;
|
|
polygons: number;
|
|
places: number;
|
|
}>;
|
|
}
|