@geoalgeria/poste 2.0.0 → 2.1.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/README.ar.md +14 -13
- package/README.fr.md +14 -13
- package/README.md +15 -13
- package/data/csv/postoffices.csv +3909 -3909
- package/data/geojson/postoffices.geojson +642 -321
- package/data/postoffices.json +642 -321
- package/package.json +1 -1
- package/types/index.d.ts +3 -0
package/README.ar.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @geoalgeria/poste
|
|
6
6
|
|
|
7
|
-
**كل مكاتب بريد وأجهزة الصراف الآلي لبريد
|
|
7
|
+
**كل مكاتب بريد وأجهزة الصراف الآلي لبريد الجزائر، كبيانات قابلة للتثبيت.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
10
10
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
3,908 مكتب بريد و2,026 جهاز صراف آلي عبر الجزائر
|
|
15
|
+
3,908 مكتب بريد و2,026 جهاز صراف آلي عبر الجزائر – مع **أكواد بريدية حقيقية**، وأسماء ثنائية اللغة (فرنسية / عربية)، وإحداثيات GPS، وربط بالبلدية/الولاية. مصدرها بريد الجزائر، متوفرة بصيغ JSON وCSV وGeoJSON. جزء من [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install @geoalgeria/poste
|
|
@@ -32,10 +32,10 @@ const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
|
32
32
|
|
|
33
33
|
## ما يمكنك بناؤه
|
|
34
34
|
|
|
35
|
-
- **التحقق من الأكواد البريدية والبحث عنها**
|
|
36
|
-
- **محددات مواقع المكاتب / أجهزة الصراف الآلي**
|
|
37
|
-
- **التكنولوجيا المالية والخدمات اللوجستية**
|
|
38
|
-
- **خرائط**
|
|
35
|
+
- **التحقق من الأكواد البريدية والبحث عنها** – كل مكتب يحمل `postal_code` الحقيقي الخاص به.
|
|
36
|
+
- **محددات مواقع المكاتب / أجهزة الصراف الآلي** – إحداثيات على (تقريبًا) كل سجل، جاهزة للترتيب حسب المسافة أو العرض على الخريطة.
|
|
37
|
+
- **التكنولوجيا المالية والخدمات اللوجستية** – مطابقة العناوين مع أقرب مكتب بريد أو صراف آلي.
|
|
38
|
+
- **خرائط** – طبقات نقاط GeoJSON جاهزة للاستخدام لشبكة البريد بالكامل.
|
|
39
39
|
|
|
40
40
|
## المحتوى
|
|
41
41
|
|
|
@@ -54,7 +54,7 @@ import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json
|
|
|
54
54
|
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
المحمّلات وأشكال السجلات **مُنمّطة** بالكامل
|
|
57
|
+
المحمّلات وأشكال السجلات **مُنمّطة** بالكامل – تعريفات TypeScript مضمنة في الحزمة:
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
60
|
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
@@ -75,7 +75,7 @@ data/
|
|
|
75
75
|
geojson/atms.geojson
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
> GeoJSON يتضمن فقط السجلات التي تحتوي على إحداثيات
|
|
78
|
+
> GeoJSON يتضمن فقط السجلات التي تحتوي على إحداثيات – 16 مكتبًا و5 أجهزة صراف
|
|
79
79
|
> آلي لا تُبلّغ عن `lat`/`lng` وتُحذف منه (لكنها تبقى في JSON/CSV، مع
|
|
80
80
|
> `geo_precision`/`geo_method` بقيمة `null`). سجلات أجهزة الصراف الآلي تحمل
|
|
81
81
|
> `commune_code` بقيمة `null` (واجهة API المصدر لا تحلّ كود بلدية لأجهزة
|
|
@@ -107,12 +107,13 @@ data/
|
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
`class` هو تصنيف المكتب (`CE`، `R1`–`R4`، `HC`، `GA`). `commune_code` هو
|
|
110
|
-
كود
|
|
111
|
-
|
|
110
|
+
كود ONS الموحّد المكوّن من 4 أرقام، والذي يرتبط بـ `code_commune` الخاص بـ
|
|
111
|
+
GeoAlgeria. عندما ينشر بريد الجزائر قيمة أصلية مختلفة، يحتفظ بها الحقل الاختياري
|
|
112
|
+
`source_commune_code` دون تغيير. `geo_precision` تكون `"exact"` (أو `null` إلى جانب
|
|
112
113
|
`lat`/`lng` عندما لا يكون المكتب مُرمّزًا جغرافيًا)؛ `geo_method` يحدد كيفية
|
|
113
114
|
الحصول على الإحداثية.
|
|
114
115
|
|
|
115
|
-
**جهاز صراف آلي**
|
|
116
|
+
**جهاز صراف آلي** – نفس الشكل، مُعرّف بـ `id`/`name`/`wilaya_code`/`postal_code`
|
|
116
117
|
مع `lat`/`lng`، بالإضافة إلى حقل `status` (`"OPEN"`، `"CLOSED (OFFLINE)"`، أو
|
|
117
118
|
قيمة المصدر غير الموثقة `"1"`)؛ `commune_code` و`address` تكون دائمًا `null`
|
|
118
119
|
(المصدر لا يحلّهما لأجهزة الصراف الآلي).
|
|
@@ -120,7 +121,7 @@ data/
|
|
|
120
121
|
## هل تحتاج التقسيمات الإدارية أيضًا؟
|
|
121
122
|
|
|
122
123
|
إذا كنت تحتاج أيضًا الولايات والدوائر والبلديات، استخدم الحزمة الرئيسية
|
|
123
|
-
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)**
|
|
124
|
+
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** – فهي تدمج
|
|
124
125
|
بيانات البريد هذه وتوفر `postOffices` / `atms` إلى جانب مجموعة بيانات
|
|
125
126
|
التقسيمات الكاملة. استخدم `@geoalgeria/poste` عندما تحتاج *فقط* البيانات
|
|
126
127
|
البريدية/المصرفية.
|
|
@@ -131,7 +132,7 @@ data/
|
|
|
131
132
|
(<https://baridimap.poste.dz>). نفّذ `npm run fetch` لإعادة توليد جميع
|
|
132
133
|
المخرجات من واجهة API المباشرة؛ نفس العملية تعكس البيانات في حزمة `geoalgeria`
|
|
133
134
|
حتى لا يحدث اختلاف بينهما أبدًا (هذه الحزمة هي المصدر المرجعي). أعد التشغيل
|
|
134
|
-
دوريًا
|
|
135
|
+
دوريًا – BaridiMap لا يزال يصنف المكاتب وفق نظام 58 ولاية، لذا الولايات
|
|
135
136
|
الجديدة 59–69 تظهر حاليًا تحت ولاياتها الأم.
|
|
136
137
|
|
|
137
138
|
## الترخيص والإسناد
|
package/README.fr.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @geoalgeria/poste
|
|
6
6
|
|
|
7
|
-
**Chaque bureau et distributeur d'Algérie Poste
|
|
7
|
+
**Chaque bureau et distributeur d'Algérie Poste, sous forme de données installables.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
10
10
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
3 908 bureaux de poste et 2 026 distributeurs automatiques (DAB) à travers l'Algérie
|
|
15
|
+
3 908 bureaux de poste et 2 026 distributeurs automatiques (DAB) à travers l'Algérie – avec de **vrais codes postaux**, des noms bilingues (français / arabe), des coordonnées GPS et un rattachement commune/wilaya. Données issues d'Algérie Poste, distribuées en JSON, CSV et GeoJSON. Fait partie de [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install @geoalgeria/poste
|
|
@@ -32,10 +32,10 @@ const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
|
32
32
|
|
|
33
33
|
## Ce que vous pouvez construire
|
|
34
34
|
|
|
35
|
-
- **Validation et recherche de codes postaux**
|
|
36
|
-
- **Localisateurs de bureaux / DAB**
|
|
37
|
-
- **Fintech et logistique**
|
|
38
|
-
- **Cartes**
|
|
35
|
+
- **Validation et recherche de codes postaux** – chaque bureau porte son vrai `postal_code`.
|
|
36
|
+
- **Localisateurs de bureaux / DAB** – coordonnées sur (presque) chaque enregistrement, prêtes pour le tri par distance ou l'affichage sur carte.
|
|
37
|
+
- **Fintech et logistique** – faites correspondre les adresses au bureau de poste ou au GAB le plus proche.
|
|
38
|
+
- **Cartes** – couches de points GeoJSON prêtes à l'emploi pour l'ensemble du réseau postal.
|
|
39
39
|
|
|
40
40
|
## Contenu
|
|
41
41
|
|
|
@@ -54,7 +54,7 @@ import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json
|
|
|
54
54
|
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Les chargeurs et les structures d'enregistrements sont entièrement **typés**
|
|
57
|
+
Les chargeurs et les structures d'enregistrements sont entièrement **typés** – les définitions TypeScript sont incluses dans le paquet :
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
60
|
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
@@ -75,7 +75,7 @@ data/
|
|
|
75
75
|
geojson/atms.geojson
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
> Le GeoJSON n'inclut que les enregistrements ayant des coordonnées
|
|
78
|
+
> Le GeoJSON n'inclut que les enregistrements ayant des coordonnées – 16
|
|
79
79
|
> bureaux et 5 DAB ne rapportent pas de `lat`/`lng` et en sont absents (mais
|
|
80
80
|
> restent dans JSON/CSV, avec `geo_precision`/`geo_method` à `null`). Les
|
|
81
81
|
> enregistrements de DAB portent `commune_code` à `null` (l'API source ne
|
|
@@ -107,11 +107,12 @@ data/
|
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
`class` est la catégorie du bureau (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code`
|
|
110
|
-
est le code
|
|
111
|
-
|
|
110
|
+
est le code ONS normalisé à 4 chiffres qui se joint au `code_commune` de
|
|
111
|
+
GeoAlgeria. Quand Algérie Poste publie une valeur native différente, le champ
|
|
112
|
+
facultatif `source_commune_code` la conserve sans modification. `geo_precision` vaut `"exact"` (ou `null` avec `lat`/`lng` quand
|
|
112
113
|
le bureau n'est pas géocodé) ; `geo_method` indique comment le point a été obtenu.
|
|
113
114
|
|
|
114
|
-
**DAB**
|
|
115
|
+
**DAB** – même structure, identifié par `id`/`name`/`wilaya_code`/`postal_code`
|
|
115
116
|
avec `lat`/`lng`, plus un champ `status` (`"OPEN"`, `"CLOSED (OFFLINE)"`, ou la
|
|
116
117
|
valeur source non documentée `"1"`) ; `commune_code` et `address` sont toujours
|
|
117
118
|
`null` (la source ne les résout pas pour les DAB).
|
|
@@ -119,7 +120,7 @@ valeur source non documentée `"1"`) ; `commune_code` et `address` sont toujours
|
|
|
119
120
|
## Besoin des divisions administratives ?
|
|
120
121
|
|
|
121
122
|
Si vous avez aussi besoin des wilayas, dairas et communes, utilisez le paquet
|
|
122
|
-
principal **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)**
|
|
123
|
+
principal **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** – il
|
|
123
124
|
intègre ces données postales et expose `postOffices` / `atms` aux côtés du jeu
|
|
124
125
|
de données complet des divisions. Utilisez `@geoalgeria/poste` quand vous
|
|
125
126
|
n'avez besoin *que* des données postales/bancaires.
|
|
@@ -130,7 +131,7 @@ Les données proviennent d'**Algérie Poste** via l'API publique BaridiMap
|
|
|
130
131
|
(<https://baridimap.poste.dz>). Exécutez `npm run fetch` pour régénérer toutes
|
|
131
132
|
les sorties à partir de l'API en direct ; la même exécution reflète les données
|
|
132
133
|
dans le paquet `geoalgeria` pour que les deux ne divergent jamais (ce paquet est
|
|
133
|
-
la source canonique). Relancez périodiquement
|
|
134
|
+
la source canonique). Relancez périodiquement – BaridiMap classe toujours les
|
|
134
135
|
bureaux selon le schéma à 58 wilayas, donc les nouvelles wilayas 59–69
|
|
135
136
|
apparaissent actuellement sous leur wilaya mère.
|
|
136
137
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @geoalgeria/poste
|
|
6
6
|
|
|
7
|
-
**Every Algérie Poste office and ATM
|
|
7
|
+
**Every Algérie Poste office and ATM, as data you can install.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
10
10
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
3,908 post offices and 2,026 ATMs across Algeria
|
|
15
|
+
3,908 post offices and 2,026 ATMs across Algeria, with **real postal codes**, bilingual (French / Arabic) names, GPS coordinates, and commune/wilaya linkage. Sourced from Algérie Poste, shipped as JSON, CSV, and GeoJSON. Part of [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install @geoalgeria/poste
|
|
@@ -32,10 +32,10 @@ const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
|
32
32
|
|
|
33
33
|
## What you can build
|
|
34
34
|
|
|
35
|
-
- **Postal-code validation & lookup**
|
|
36
|
-
- **Branch / ATM locators**
|
|
37
|
-
- **Fintech & logistics**
|
|
38
|
-
- **Maps**
|
|
35
|
+
- **Postal-code validation & lookup** – every office carries its real `postal_code`.
|
|
36
|
+
- **Branch / ATM locators** – coordinates on (almost) every record, ready for distance sorting or a map.
|
|
37
|
+
- **Fintech & logistics** – match addresses to the nearest post office or GAB.
|
|
38
|
+
- **Maps** – drop-in GeoJSON point layers for the whole postal network.
|
|
39
39
|
|
|
40
40
|
## What's inside
|
|
41
41
|
|
|
@@ -54,7 +54,7 @@ import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json
|
|
|
54
54
|
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
The loaders and record shapes are fully **typed
|
|
57
|
+
The loaders and record shapes are fully **typed**, TypeScript definitions ship in the package:
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
60
|
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
@@ -75,7 +75,7 @@ data/
|
|
|
75
75
|
geojson/atms.geojson
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
> GeoJSON includes only records that have coordinates
|
|
78
|
+
> GeoJSON includes only records that have coordinates, 16 offices and 5 ATMs
|
|
79
79
|
> report no `lat`/`lng` and are omitted there (but remain in JSON/CSV, with
|
|
80
80
|
> `geo_precision`/`geo_method` both `null`). ATM records carry `commune_code`
|
|
81
81
|
> as `null` (the source API doesn't resolve ATMs to a commune code).
|
|
@@ -106,11 +106,13 @@ data/
|
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
`class` is the office category (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code` is
|
|
109
|
-
|
|
109
|
+
the normalized 4-digit ONS code that joins to GeoAlgeria's `code_commune`.
|
|
110
|
+
When Algérie Poste publishes a different native value, the optional
|
|
111
|
+
`source_commune_code` preserves it unchanged.
|
|
110
112
|
`geo_precision` is `"exact"` (or `null` alongside `lat`/`lng` when the office
|
|
111
113
|
isn't geocoded); `geo_method` names how the point was obtained.
|
|
112
114
|
|
|
113
|
-
**ATM**
|
|
115
|
+
**ATM** – same shape, keyed by `id`/`name`/`wilaya_code`/`postal_code` with
|
|
114
116
|
`lat`/`lng`, plus a `status` field (`"OPEN"`, `"CLOSED (OFFLINE)"`, or the
|
|
115
117
|
undocumented source value `"1"`); `commune_code` and `address` are always
|
|
116
118
|
`null` (the source doesn't resolve them for ATMs).
|
|
@@ -118,7 +120,7 @@ undocumented source value `"1"`); `commune_code` and `address` are always
|
|
|
118
120
|
## Need the administrative divisions too?
|
|
119
121
|
|
|
120
122
|
If you also need wilayas, dairas, and communes, use the main
|
|
121
|
-
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package
|
|
123
|
+
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package, it mirrors
|
|
122
124
|
this postal data in and exposes `postOffices` / `atms` alongside the full
|
|
123
125
|
division dataset. Use `@geoalgeria/poste` when you *only* need postal/banking data.
|
|
124
126
|
|
|
@@ -127,8 +129,8 @@ division dataset. Use `@geoalgeria/poste` when you *only* need postal/banking da
|
|
|
127
129
|
Data comes from **Algérie Poste** via the public BaridiMap API
|
|
128
130
|
(<https://baridimap.poste.dz>). Run `npm run fetch` to regenerate every output
|
|
129
131
|
from the live API; the same run mirrors the data into the `geoalgeria` package so
|
|
130
|
-
the two never drift (this package is the canonical source). Re-fetch periodically
|
|
131
|
-
|
|
132
|
+
the two never drift (this package is the canonical source). Re-fetch periodically.
|
|
133
|
+
BaridiMap still files offices under the 58-wilaya scheme, so new wilayas 59–69
|
|
132
134
|
currently appear under their mother wilaya.
|
|
133
135
|
|
|
134
136
|
## License & attribution
|