110 lines
3.5 KiB
TypeScript
110 lines
3.5 KiB
TypeScript
import { GeocodingService } from './geocoding.service';
|
|
import { AdminBoundariesService } from './admin-boundaries.service';
|
|
import { JordanResearchService } from './jordan-research.service';
|
|
import { AdministrativeLinkingService } from './administrative-linking.service';
|
|
import { SearchQueryDto } from './dto/search-query.dto';
|
|
import { ReverseGeocodeDto } from './dto/reverse-geocode.dto';
|
|
export declare class GeocodingController {
|
|
private readonly geocodingService;
|
|
private readonly adminBoundariesService;
|
|
private readonly jordanResearchService;
|
|
private readonly adminLinkingService;
|
|
constructor(geocodingService: GeocodingService, adminBoundariesService: AdminBoundariesService, jordanResearchService: JordanResearchService, adminLinkingService: AdministrativeLinkingService);
|
|
search(queryDto: SearchQueryDto): Promise<{
|
|
results: any;
|
|
source: string;
|
|
} | {
|
|
results: any[];
|
|
source?: undefined;
|
|
}>;
|
|
reverse(reverseDto: ReverseGeocodeDto): Promise<any>;
|
|
addPlace(placeData: any): Promise<{
|
|
latitude: number;
|
|
longitude: number;
|
|
location: string;
|
|
id: number;
|
|
name: string;
|
|
name_ar: string;
|
|
name_en: string;
|
|
address: string;
|
|
category: string;
|
|
neighbourhood: string;
|
|
city: string;
|
|
description: string;
|
|
created_at: Date;
|
|
source: string;
|
|
governorate_id: number;
|
|
district_id: number;
|
|
sub_district_id: number;
|
|
neighborhood_id: number;
|
|
}>;
|
|
deletePlace(country: string, name?: string, id?: string): Promise<{
|
|
success: boolean;
|
|
affected: number | null | undefined;
|
|
}>;
|
|
upsertPlace(placeData: any): Promise<{
|
|
id: any;
|
|
action: string;
|
|
}>;
|
|
upsertBatch(body: {
|
|
places: any[];
|
|
}): Promise<{
|
|
total: number;
|
|
processed: number;
|
|
created: number;
|
|
updated: number;
|
|
}>;
|
|
getPlaces(limit?: string): Promise<(import("./entities/place-syria.entity").PlaceSyria | import("./entities/place-jordan.entity").PlaceJordan | import("./entities/place-egypt.entity").PlaceEgypt)[]>;
|
|
getGeoJSON(): Promise<{
|
|
type: string;
|
|
features: any;
|
|
}>;
|
|
importBoundaries(country: string, filePath: string): Promise<{
|
|
success: boolean;
|
|
imported: number;
|
|
errors: number;
|
|
skipped: number;
|
|
}>;
|
|
zarqaResearch(): Promise<{
|
|
area: string;
|
|
report_timestamp: string;
|
|
sources: {
|
|
osm: any;
|
|
overture: any;
|
|
wikidata: any;
|
|
static_files: {};
|
|
hdx: string;
|
|
gadm: string;
|
|
};
|
|
comparison_summary: string;
|
|
}>;
|
|
syncNeighborhoods(bbox?: string, country?: string): Promise<{
|
|
detected_country: string;
|
|
osm_fetched: any;
|
|
country_points: number;
|
|
total_points_in_db: number;
|
|
linked_to_district: number;
|
|
}>;
|
|
generateVoronoi(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;
|
|
}>;
|
|
}
|