This commit is contained in:
Hamza-Ayed
2026-03-20 02:14:50 +03:00
parent 65ce6a0ba2
commit 6e6ee55d03
47 changed files with 14706 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
/**
* GIS Utilities for Jordan Map Platform
* أدوات مساعدة للتعامل مع البيانات الجغرافية
*/
export const JORDAN_BOUNDS = {
minLat: 29.1,
maxLat: 33.4,
minLng: 34.9,
maxLng: 39.3,
};
export function isWithinJordan(lat: number, lng: number): boolean {
return (
lat >= JORDAN_BOUNDS.minLat &&
lat <= JORDAN_BOUNDS.maxLat &&
lng >= JORDAN_BOUNDS.minLng &&
lng <= JORDAN_BOUNDS.maxLng
);
}
/**
* Snap a point to the nearest road segment (Placeholder for Map Matching logic)
* ربط نقطة جغرافية بأقرب مقطع طريق (تمهيد لمنطق مطابقة الخرائط)
*/
export function mockMapMatch(lat: number, lng: number) {
// In Phase 2, this would call GraphHopper Map Matching API
return `osm_way_${Math.floor(Math.random() * 1000000)}`;
}