@geoalgeria/aviation 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Yasser's Studio (https://yasser.studio)
3
+ Copyright (c) 2025-2026 Yasser's Studio (https://yasser.studio)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.ar.md ADDED
@@ -0,0 +1,134 @@
1
+ [English](README.md) | [Français](README.fr.md) | **العربية**
2
+
3
+ <div align="center">
4
+
5
+ # @geoalgeria/aviation
6
+
7
+ **كل مطار مدني في الجزائر — كبيانات يمكنك تثبيتها.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@geoalgeria/aviation)](https://www.npmjs.com/package/@geoalgeria/aviation)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@geoalgeria/aviation)](https://www.npmjs.com/package/@geoalgeria/aviation)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+
13
+ </div>
14
+
15
+ 33 مطارا مدنيا عبر الجزائر — بالأسماء الرسمية، **رموز OACI (ICAO)**، العناوين البريدية،
16
+ أرقام الهاتف، المواقع الإلكترونية، الإحداثيات الجغرافية (GPS)، والربط بالولاية. المصدر:
17
+ ANAC (السلطة الوطنية للطيران المدني)، متوفر بصيغ JSON وCSV وGeoJSON.
18
+ جزء من [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
19
+
20
+ ```bash
21
+ npm install @geoalgeria/aviation
22
+ ```
23
+
24
+ ```js
25
+ import aviation from "@geoalgeria/aviation";
26
+
27
+ const all = aviation.airports(); // 33
28
+ const algiers = aviation.airportByIcao("DAAG"); // هواري بومدين
29
+ const inOran = aviation.airportsByWilaya(31); // مطارات الولاية 31
30
+
31
+ // كل سجل يحتوي على إحداثيات — الترتيب حسب المسافة، الخرائط، أو أقرب مطار في بضعة أسطر.
32
+ ```
33
+
34
+ ## ما يمكنك بناؤه
35
+
36
+ - **البحث عن أقرب مطار** — إحداثيات في كل سجل، جاهزة للترتيب حسب المسافة.
37
+ - **تحويل OACI ↔ مطار** — ربط رموز OACI من بيانات الرحلات بالأسماء وجهات الاتصال والمواقع.
38
+ - **السفر والنقل** — ربط ولاية أو نقطة بالمطار الذي يخدمها.
39
+ - **الخرائط** — طبقة نقاط GeoJSON جاهزة للاستخدام لشبكة المطارات المدنية بالكامل.
40
+
41
+ ## المحتوى
42
+
43
+ | مجموعة البيانات | العدد | ملاحظات |
44
+ | --- | --- | --- |
45
+ | المطارات المدنية | **33** | الاسم الرسمي، رمز OACI، العنوان، الهاتف، الموقع الإلكتروني، الإحداثيات |
46
+
47
+ تغطي **31 ولاية**، كل مطار محدد الإحداثيات. `wilaya_code` مرتبط بنموذج الـ 69 ولاية في
48
+ [`geoalgeria`](https://www.npmjs.com/package/geoalgeria).
49
+
50
+ ## الصيغ
51
+
52
+ حزمة npm توفر صيغة **JSON** (قابلة للاستيراد مباشرة):
53
+
54
+ ```js
55
+ import airports from "@geoalgeria/aviation/data/airports.json" with { type: "json" };
56
+ // أو عبر CDN، بدون تثبيت:
57
+ // https://cdn.jsdelivr.net/npm/@geoalgeria/aviation/data/airports.json
58
+ ```
59
+
60
+ أدوات التحميل وأشكال السجلات **مصنّفة بالكامل** — تعريفات TypeScript مضمّنة في الحزمة:
61
+
62
+ ```ts
63
+ import aviation, { type Airport } from "@geoalgeria/aviation";
64
+ const airports: Airport[] = aviation.airports();
65
+ ```
66
+
67
+ صيغتا **CSV وGeoJSON** موجودتان في المستودع ضمن [`data/`](data) ومضمّنتان في كل
68
+ [إصدار على GitHub](https://github.com/yasserstudio/geoalgeria/releases):
69
+
70
+ ```
71
+ data/
72
+ airports.json # 33 مطارا (مصفوفة)
73
+ metadata.json # المصادر، الأعداد، الترخيص، updated
74
+ csv/airports.csv # المستودع + حزمة الإصدار (غير مضمّن في tarball npm)
75
+ geojson/airports.geojson # معالم نقطية (جميع الـ 33 محددة الإحداثيات)
76
+ ```
77
+
78
+ ## شكل السجل
79
+
80
+ ```json
81
+ {
82
+ "id": "daag",
83
+ "name": "Aéroport d’Alger – Houari Boumediene",
84
+ "wilaya_code": "16",
85
+ "commune_code": null,
86
+ "commune": null,
87
+ "lat": 36.69951171485545,
88
+ "lng": 3.210846808533331,
89
+ "geo_precision": "exact",
90
+ "geo_method": "source_point",
91
+ "source": "anac",
92
+ "refs": { "icao": "DAAG" },
93
+ "icao": "DAAG",
94
+ "iata": null,
95
+ "address": "Alger BP 164 DAR EL BEIDA",
96
+ "phone": "+21323199230",
97
+ "website": "https://www.aeroportalger.dz/"
98
+ }
99
+ ```
100
+
101
+ `id` هو رمز OACI بأحرف صغيرة. `icao` يطابق دائما النمط `DA[A-Z]{2}`. `iata` قيمته `null` — تنشر
102
+ ANAC رموز OACI فقط (الحقل محجوز للإثراء لاحقا). `wilaya_code` مكمّل بصفر إلى رقمين ويرتبط
103
+ بولايات GeoAlgeria؛ هذه المجموعة تغطي مستوى الولاية فقط، لذا `commune_code` و`commune` قيمتهما
104
+ دائما `null`. كل نقطة تأتي مباشرة من الخريطة المنشورة من ANAC، لذا `geo_precision` قيمتها دائما
105
+ `"exact"` و`geo_method` قيمتها دائما `"source_point"` — لا شيء هنا قيمة احتياطية أو تخفيض دقة.
106
+ `source` هو مفتاح قصير يُحلّ في `metadata.sources[]` (دائما `"anac"`)، و`refs.icao` يكرر `icao`
107
+ في المستوى الأعلى. سجل واحد فقط (`dabs`، تبسة) لديه `phone` بقيمة `null` حيث لا تذكر ANAC رقما.
108
+
109
+ ## هل تحتاج التقسيمات الإدارية أيضا؟
110
+
111
+ إذا كنت تحتاج أيضا الولايات والدوائر والبلديات للربط، استخدم الحزمة الرئيسية
112
+ **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** — توفر مجموعة بيانات التقسيم
113
+ الكاملة للـ 69 ولاية التي يشير إليها `wilaya_code` هنا. استخدم `@geoalgeria/aviation`
114
+ عندما تحتاج *فقط* بيانات المطارات.
115
+
116
+ ## المصدر
117
+
118
+ البيانات من **ANAC — السلطة الوطنية للطيران المدني**، عبر خريطة المطارات العامة
119
+ (<https://www.anac.dz/en/carte-des-aeroports-3/>). شغّل `npm run fetch` لإعادة توليد جميع
120
+ المخرجات من الخريطة الحية؛ عملية البناء تتبع iframe الخريطة لذا لن تتعطل عند تحديث إصدار
121
+ ANAC، وتفشل بوضوح إذا تغيّر عدد المطارات أو تنسيق OACI. يتم تحديد `wilaya_code` عبر أقرب
122
+ مركز بلدية من مجموعة بيانات `geoalgeria` (الحزمة الرئيسية توفر مراكز البلديات وليس مضلعات
123
+ الحدود).
124
+
125
+ ## الترخيص والإسناد
126
+
127
+ الكود مرخّص بموجب [MIT](LICENSE). البيانات الأساسية © **ANAC**، معاد توزيعها كمرجع ولتشغيل
128
+ [GeoAlgeria](https://geoalgeria.com). تحقق من ANAC للحصول على معلومات رسمية ومحدّثة.
129
+
130
+ [توثيق API ومرجع الحقول →](https://geoalgeria.com/data/docs/aviation) · [تصفح جميع الحزم →](https://geoalgeria.com/data)
131
+
132
+ ---
133
+
134
+ صنع بواسطة [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
package/README.fr.md ADDED
@@ -0,0 +1,138 @@
1
+ [English](README.md) | **Français** | [العربية](README.ar.md)
2
+
3
+ <div align="center">
4
+
5
+ # @geoalgeria/aviation
6
+
7
+ **Tous les aéroports civils d'Algérie — sous forme de données installables.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@geoalgeria/aviation)](https://www.npmjs.com/package/@geoalgeria/aviation)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@geoalgeria/aviation)](https://www.npmjs.com/package/@geoalgeria/aviation)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
+
13
+ </div>
14
+
15
+ 33 aéroports civils à travers l'Algérie — avec les noms officiels, les **codes OACI (ICAO)**,
16
+ les adresses postales, numéros de téléphone, sites web, coordonnées GPS et rattachement
17
+ à la wilaya. Source : ANAC (Autorité Nationale de l'Aviation Civile), distribué en JSON,
18
+ CSV et GeoJSON. Fait partie de [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
19
+
20
+ ```bash
21
+ npm install @geoalgeria/aviation
22
+ ```
23
+
24
+ ```js
25
+ import aviation from "@geoalgeria/aviation";
26
+
27
+ const all = aviation.airports(); // 33
28
+ const algiers = aviation.airportByIcao("DAAG"); // Houari Boumediene
29
+ const inOran = aviation.airportsByWilaya(31); // aéroports de la wilaya 31
30
+
31
+ // Chaque enregistrement a lat/lng — tri par distance, carte ou aéroport le plus proche en quelques lignes.
32
+ ```
33
+
34
+ ## Ce que vous pouvez construire
35
+
36
+ - **Recherche de l'aéroport le plus proche** — coordonnées sur chaque enregistrement, prêtes pour le tri par distance.
37
+ - **Résolution OACI ↔ aéroport** — associer les codes OACI des données de vol aux noms, contacts et localisations.
38
+ - **Voyage et logistique** — associer une wilaya ou un point à son aéroport desservant.
39
+ - **Cartes** — couche de points GeoJSON prête à l'emploi pour tout le réseau d'aéroports civils.
40
+
41
+ ## Contenu
42
+
43
+ | Jeu de données | Nombre | Notes |
44
+ | --- | --- | --- |
45
+ | Aéroports civils | **33** | nom officiel, code OACI, adresse, téléphone, site web, coordonnées |
46
+
47
+ Couvrant **31 wilayas**, chaque aéroport est géocodé. `wilaya_code` est lié au modèle
48
+ 69 wilayas de [`geoalgeria`](https://www.npmjs.com/package/geoalgeria).
49
+
50
+ ## Formats
51
+
52
+ Le package npm fournit le **JSON** (importable directement) :
53
+
54
+ ```js
55
+ import airports from "@geoalgeria/aviation/data/airports.json" with { type: "json" };
56
+ // ou via CDN, sans installation :
57
+ // https://cdn.jsdelivr.net/npm/@geoalgeria/aviation/data/airports.json
58
+ ```
59
+
60
+ Les chargeurs et les formes d'enregistrement sont entièrement **typés** — les définitions TypeScript sont incluses dans le package :
61
+
62
+ ```ts
63
+ import aviation, { type Airport } from "@geoalgeria/aviation";
64
+ const airports: Airport[] = aviation.airports();
65
+ ```
66
+
67
+ Les formats **CSV et GeoJSON** sont dans le dépôt sous [`data/`](data) et inclus dans chaque
68
+ [Release GitHub](https://github.com/yasserstudio/geoalgeria/releases) :
69
+
70
+ ```
71
+ data/
72
+ airports.json # 33 aéroports (tableau)
73
+ metadata.json # sources, comptages, licence, updated
74
+ csv/airports.csv # dépôt + bundle Release (pas dans le tarball npm)
75
+ geojson/airports.geojson # Entités Point (les 33 sont géocodés)
76
+ ```
77
+
78
+ ## Structure d'un enregistrement
79
+
80
+ ```json
81
+ {
82
+ "id": "daag",
83
+ "name": "Aéroport d’Alger – Houari Boumediene",
84
+ "wilaya_code": "16",
85
+ "commune_code": null,
86
+ "commune": null,
87
+ "lat": 36.69951171485545,
88
+ "lng": 3.210846808533331,
89
+ "geo_precision": "exact",
90
+ "geo_method": "source_point",
91
+ "source": "anac",
92
+ "refs": { "icao": "DAAG" },
93
+ "icao": "DAAG",
94
+ "iata": null,
95
+ "address": "Alger BP 164 DAR EL BEIDA",
96
+ "phone": "+21323199230",
97
+ "website": "https://www.aeroportalger.dz/"
98
+ }
99
+ ```
100
+
101
+ `id` est le code OACI en minuscules. `icao` correspond toujours au format `DA[A-Z]{2}`. `iata`
102
+ est `null` — l'ANAC ne publie que les codes OACI (le champ est réservé pour un enrichissement
103
+ ultérieur). `wilaya_code` est complété à deux chiffres avec un zéro et rejoint les wilayas de
104
+ GeoAlgeria ; ce jeu de données ne couvre que le niveau wilaya, donc `commune_code` et `commune`
105
+ sont toujours `null`. Chaque point provient directement de la carte publiée par l'ANAC, donc
106
+ `geo_precision` vaut toujours `"exact"` et `geo_method` vaut toujours `"source_point"` — rien
107
+ ici n'est une valeur de repli ou une dégradation. `source` est une clé courte résolue dans
108
+ `metadata.sources[]` (toujours `"anac"`), et `refs.icao` duplique le `icao` de premier niveau.
109
+ Un seul enregistrement (`dabs`, Tébessa) a un `phone` à `null` lorsque l'ANAC n'en indique pas.
110
+
111
+ ## Besoin aussi des divisions administratives ?
112
+
113
+ Si vous avez également besoin des wilayas, dairas et communes pour des jointures, utilisez
114
+ le package principal **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** — il fournit
115
+ le jeu de données complet des 69 wilayas auquel `wilaya_code` fait référence ici. Utilisez
116
+ `@geoalgeria/aviation` quand vous avez *uniquement* besoin des données aéroportuaires.
117
+
118
+ ## Source
119
+
120
+ Les données proviennent de l'**ANAC — Autorité Nationale de l'Aviation Civile**, via la carte
121
+ publique des aéroports (<https://www.anac.dz/en/carte-des-aeroports-3/>). Exécutez `npm run fetch`
122
+ pour régénérer toutes les sorties à partir de la carte en direct ; le build suit l'iframe de la
123
+ carte, donc une mise à jour de version par l'ANAC ne le casse pas, et il échoue bruyamment si le
124
+ nombre d'aéroports ou le format OACI change. `wilaya_code` est résolu par le centroïde de commune
125
+ le plus proche à partir du jeu de données `geoalgeria` (le package principal fournit des
126
+ centroïdes, pas des polygones de limites).
127
+
128
+ ## Licence et attribution
129
+
130
+ Le code est sous licence [MIT](LICENSE). Les données sous-jacentes sont © **ANAC**, redistribuées
131
+ à titre de référence et pour alimenter [GeoAlgeria](https://geoalgeria.com). Vérifiez auprès de
132
+ l'ANAC pour des informations officielles et en temps réel.
133
+
134
+ [Documentation API et référence des champs →](https://geoalgeria.com/data/docs/aviation) · [Parcourir tous les paquets →](https://geoalgeria.com/data)
135
+
136
+ ---
137
+
138
+ Fait par [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ **English** | [Français](README.fr.md) | [العربية](README.ar.md)
2
+
1
3
  <div align="center">
2
4
 
3
5
  # @geoalgeria/aviation
@@ -68,7 +70,7 @@ const airports: Airport[] = aviation.airports();
68
70
  ```
69
71
  data/
70
72
  airports.json # 33 airports (array)
71
- metadata.json # source, counts, generated_at
73
+ metadata.json # sources, counts, license, updated
72
74
  csv/airports.csv # repo + Release bundle (not in npm tarball)
73
75
  geojson/airports.geojson # Point features (all 33 are geocoded)
74
76
  ```
@@ -79,22 +81,31 @@ data/
79
81
  {
80
82
  "id": "daag",
81
83
  "name": "Aéroport d’Alger – Houari Boumediene",
84
+ "wilaya_code": "16",
85
+ "commune_code": null,
86
+ "commune": null,
87
+ "lat": 36.69951171485545,
88
+ "lng": 3.210846808533331,
89
+ "geo_precision": "exact",
90
+ "geo_method": "source_point",
91
+ "source": "anac",
92
+ "refs": { "icao": "DAAG" },
82
93
  "icao": "DAAG",
83
94
  "iata": null,
84
95
  "address": "Alger BP 164 DAR EL BEIDA",
85
96
  "phone": "+21323199230",
86
- "website": "https://www.aeroportalger.dz/",
87
- "wilaya_code": "16",
88
- "lat": 36.69951171485545,
89
- "lng": 3.210846808533331,
90
- "source": "https://www.anac.dz/en/carte-des-aeroports-3/"
97
+ "website": "https://www.aeroportalger.dz/"
91
98
  }
92
99
  ```
93
100
 
94
- `id` is the ICAO code lowercased. `icao` always matches `DA__`. `iata` is `null` — ANAC
101
+ `id` is the ICAO code lowercased. `icao` always matches `DA[A-Z]{2}`. `iata` is `null` — ANAC
95
102
  publishes only ICAO codes (the slot is reserved for later enrichment). `wilaya_code` is
96
- zero-padded to two digits and joins GeoAlgeria's wilayas; a few records may have a `null`
97
- `phone` where ANAC lists none.
103
+ zero-padded to two digits and joins GeoAlgeria's wilayas; this dataset is wilaya-level only, so
104
+ `commune_code` and `commune` are always `null`. Every point comes straight from ANAC's own
105
+ published map, so `geo_precision` is always `"exact"` and `geo_method` is always
106
+ `"source_point"` — nothing here is a fallback or a downgrade. `source` is a short key resolved
107
+ in `metadata.sources[]` (always `"anac"`), and `refs.icao` duplicates the top-level `icao`. One
108
+ record (`dabs`, Tébessa) has a `null` `phone` where ANAC lists none.
98
109
 
99
110
  ## Need the administrative divisions too?
100
111
 
@@ -117,3 +128,9 @@ dataset (the flagship ships centroids, not boundary polygons).
117
128
  Code is [MIT](LICENSE). The underlying data is © **ANAC**, redistributed for reference
118
129
  and to power [GeoAlgeria](https://geoalgeria.com). Verify against ANAC for authoritative,
119
130
  real-time information.
131
+
132
+ [API docs & field reference →](https://geoalgeria.com/data/docs/aviation) · [Browse all packages →](https://geoalgeria.com/data)
133
+
134
+ ---
135
+
136
+ Made by [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)