stable: finalized GIS aesthetics and Syria/Jordan routing synchronization

This commit is contained in:
Hamza-Ayed
2026-03-28 04:12:01 +03:00
parent d6f3b41b53
commit 592af8ce5c
203 changed files with 9711 additions and 119 deletions
@@ -0,0 +1,60 @@
import { Entity, Column, PrimaryGeneratedColumn, Index, CreateDateColumn } from 'typeorm';
/**
* Candidate Road Entity - طرق مرشحة مكتشفة من بيانات التتبع
*
* Stores potential new roads discovered from telemetry data where
* multiple drivers traveled off-road in a consistent linear pattern.
*/
@Entity('candidate_roads')
export class CandidateRoad {
@PrimaryGeneratedColumn('uuid')
id: string;
// GeoJSON LineString representing the discovered road path
// خط يمثل المسار المكتشف
@Column({
type: 'geography',
spatialFeatureType: 'LineString',
srid: 4326,
nullable: false,
})
@Index({ spatial: true })
geometry: any;
// Number of unique drivers who used this path
// عدد السائقين الفريدين الذين استخدموا هذا المسار
@Column('int', { default: 0 })
uniqueDriverCount: number;
// Total telemetry points that contributed to this candidate
// عدد النقاط الإجمالي المساهم في اكتشاف هذا المسار
@Column('int', { default: 0 })
totalPoints: number;
// Average speed observed on this candidate road (km/h)
// متوسط السرعة المسجلة (كم/ساعة)
@Column('float', { default: 0 })
averageSpeed: number;
// Estimated length in meters
// الطول التقريبي بالمتر
@Column('float', { default: 0 })
lengthMeters: number;
// Confidence score (0-1): higher = more likely a real road
// درجة الثقة (0-1): كلما زادت كلما كان احتمال كونها طريق حقيقي أعلى
@Column('float', { default: 0 })
confidence: number;
// Review status: 'pending', 'approved', 'rejected'
// حالة المراجعة: pending=بانتظار المراجعة، approved=تمت الموافقة، rejected=مرفوض
@Column({ default: 'pending' })
status: string;
@CreateDateColumn()
discoveredAt: Date;
@Column({ type: 'timestamp', nullable: true })
reviewedAt: Date;
}