@geoalgeria/buses 2.2.2 → 2.2.3
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/data/csv/stations.csv +4 -4
- package/data/geojson/stations.geojson +18 -18
- package/data/metadata.json +2 -2
- package/data/stations.json +11 -11
- package/index.js +3 -6
- package/loaders.cjs +38 -0
- package/package.json +2 -1
package/data/csv/stations.csv
CHANGED
|
@@ -960,7 +960,7 @@ osm-node-5380774419,Hamma,,,16,,,36.748569,3.069155,exact,osm_node,osm,"{""osm""
|
|
|
960
960
|
osm-node-5380774420,Sidi M'hamed,,,16,,,36.74966,3.066807,exact,osm_node,osm,"{""osm"":""node/5380774420""}",node,5380774420,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-6""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
961
961
|
osm-node-5380774821,Place du 11 Décembre,,,16,,,36.75217,3.062524,exact,osm_node,osm,"{""osm"":""node/5380774821""}",node,5380774821,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-34"",""etusa-6""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
962
962
|
osm-node-5380774822,Musset,,,16,,,36.754901,3.06019,exact,osm_node,osm,"{""osm"":""node/5380774822""}",node,5380774822,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-34"",""etusa-6""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
963
|
-
osm-node-5380774823,1er Mai,1er Mai,,16,,,36.
|
|
963
|
+
osm-node-5380774823,1er Mai,1er Mai,,16,,,36.7599996,3.0569475,exact,osm_node,osm,"{""osm"":""node/5380774823""}",node,5380774823,"[""etusa""]","[""etusa-14"",""etusa-15"",""etusa-16"",""etusa-27"",""etusa-34"",""etusa-88""]",point_in_wilaya,"[""stop"",""stop_entry_only"",""stop_exit_only""]",,stop_position
|
|
964
964
|
osm-node-5380794977,LES ATELIERS الورشات,LES ATELIERS,الورشات,16,,,36.752082,3.070571,exact,osm_node,osm,"{""osm"":""node/5380794977""}",node,5380794977,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-34"",""etusa-6""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
965
965
|
osm-node-5380794978,Jardin d'Essai حديقة التجارب,Jardin d'Essai,حديقة التجارب,16,,,36.750805,3.076295,exact,osm_node,osm,"{""osm"":""node/5380794978""}",node,5380794978,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-34"",""etusa-6""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
966
966
|
osm-node-5380794979,Hamoud Boualem,,,16,,,36.747946,3.083912,exact,osm_node,osm,"{""osm"":""node/5380794979""}",node,5380794979,"[""etusa""]","[""etusa-14"",""etusa-27"",""etusa-34"",""etusa-6"",""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
@@ -982,7 +982,7 @@ osm-node-5387202990,Cité Amirouche,,,16,,,36.738042,3.094515,exact,osm_node,osm
|
|
|
982
982
|
osm-node-5387204311,Cité Mer et Soleil,Cité Mer et Soleil,حي البحر والشمس,16,,,36.73362,3.101046,exact,osm_node,osm,"{""osm"":""node/5387204311""}",node,5387204311,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
983
983
|
osm-node-5387204312,Cité Mer et Soleil,Cité Mer et Soleil,حي البحر والشمس,16,,,36.733665,3.101067,exact,osm_node,osm,"{""osm"":""node/5387204312""}",node,5387204312,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
984
984
|
osm-node-5387204313,Durafour,,,16,,,36.732838,3.10467,exact,osm_node,osm,"{""osm"":""node/5387204313""}",node,5387204313,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
985
|
-
osm-node-5387204314,PARNET,,,16,,,36.
|
|
985
|
+
osm-node-5387204314,PARNET,,,16,,,36.7329998,3.1047857,exact,osm_node,osm,"{""osm"":""node/5387204314""}",node,5387204314,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
986
986
|
osm-node-5387204315,CITE MAYA,,,16,,,36.730146,3.103059,exact,osm_node,osm,"{""osm"":""node/5387204315""}",node,5387204315,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
987
987
|
osm-node-5387204316,CITE MAYA,,,16,,,36.731271,3.103841,exact,osm_node,osm,"{""osm"":""node/5387204316""}",node,5387204316,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
988
988
|
osm-node-5387204317,STATION HAI EL BADR,,,16,,,36.72464,3.101326,exact,osm_node,osm,"{""osm"":""node/5387204317""}",node,5387204317,"[""etusa""]","[""etusa-66""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
@@ -1288,7 +1288,7 @@ osm-node-5400072357,Sup,,,16,,,36.760864,3.048963,exact,osm_node,osm,"{""osm"":"
|
|
|
1288
1288
|
osm-node-5400883172,عين تقورايت - المدرسة الثانوية منى بن طاهر,AÏN TAGOURAIT - LYCEE BENTAHAR MOUNA -,عين تقورايت - المدرسة الثانوية منى بن طاهر,42,,,36.599782,2.596993,exact,osm_node,osm,"{""osm"":""node/5400883172""}",node,5400883172,"[""etusa""]","[""etusa-747""]",point_in_wilaya,"[""stop_exit_only""]",,stop_position
|
|
1289
1289
|
osm-node-5400891416,Aïn Benian - Gare routière,Aïn Benian - Gare routière,,16,,,36.80177,2.910338,exact,osm_node,osm,"{""osm"":""node/5400891416""}",node,5400891416,"[""etusa""]","[""etusa-99""]",point_in_wilaya,"[""stop_exit_only""]",,stop_position
|
|
1290
1290
|
osm-node-5400906393,Bouzareah,Bouzareah,,16,,,36.790209,3.01721,exact,osm_node,osm,"{""osm"":""node/5400906393""}",node,5400906393,"[""etusa""]","[""etusa-10"",""etusa-45""]",point_in_wilaya,"[""stop_entry_only"",""stop_exit_only""]",,stop_position
|
|
1291
|
-
osm-node-5400974163,Oukba,Oukba,عقبة,16,,,36.789114,3.
|
|
1291
|
+
osm-node-5400974163,Oukba,Oukba,عقبة,16,,,36.789114,3.0559999,exact,osm_node,osm,"{""osm"":""node/5400974163""}",node,5400974163,"[""etusa""]","[""etusa-45""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
1292
1292
|
osm-node-5400974164,El Kettar,El Kettar,,16,,,36.785686,3.047449,exact,osm_node,osm,"{""osm"":""node/5400974164""}",node,5400974164,"[""etusa""]","[""etusa-45"",""etusa-46""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1293
1293
|
osm-node-5400974165,Secouto,Secouto,,16,,,36.785429,3.042624,exact,osm_node,osm,"{""osm"":""node/5400974165""}",node,5400974165,"[""etusa""]","[""etusa-45"",""etusa-58""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1294
1294
|
osm-node-5400974166,Sekoto,Secouto,,16,,,36.785431,3.0429,exact,osm_node,osm,"{""osm"":""node/5400974166""}",node,5400974166,"[""etusa""]","[""etusa-45"",""etusa-58""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
@@ -1465,7 +1465,7 @@ osm-node-843185870,Hidhab 3 bus stop,,,19,,,36.206628,5.437027,exact,osm_node,os
|
|
|
1465
1465
|
osm-node-843185958,Hidhab 2 bus stop,,,19,,,36.205865,5.435692,exact,osm_node,osm,"{""osm"":""node/843185958""}",node,843185958,"[""etus-setif""]","[""etus-setif-104""]",point_in_wilaya,"[""stop""]",,stop_position
|
|
1466
1466
|
osm-node-9031893751,الجامعة (الحديقة),,,14,,,35.34936,1.317343,exact,osm_node,osm,"{""osm"":""node/9031893751""}",node,9031893751,"[""etus-tiaret""]","[""etus-tiaret-26""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1467
1467
|
osm-node-9031893753,نفطال,,,14,,,35.366051,1.312744,exact,osm_node,osm,"{""osm"":""node/9031893753""}",node,9031893753,"[""etus-tiaret""]","[""etus-tiaret-26""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1468
|
-
osm-node-9031893754,,,,14,,,35.
|
|
1468
|
+
osm-node-9031893754,,,,14,,,35.3613829,1.3119995,exact,osm_node,osm,"{""osm"":""node/9031893754""}",node,9031893754,"[""etus-tiaret""]","[""etus-tiaret-26""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1469
1469
|
osm-node-9031893755,مديرية النشاط الاجتماعي,,,14,,,35.374195,1.323314,exact,osm_node,osm,"{""osm"":""node/9031893755""}",node,9031893755,"[""etus-tiaret""]","[""etus-tiaret-26"",""etus-tiaret-31""]",point_in_wilaya,"[""platform""]",,platform
|
|
1470
1470
|
osm-node-9031893756,المركب الجواري المدرسة,,,14,,,35.37129,1.317172,exact,osm_node,osm,"{""osm"":""node/9031893756""}",node,9031893756,"[""etus-tiaret""]","[""etus-tiaret-26""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
1471
1471
|
osm-node-9031893757,ملتقى الطرق (المقبرة),,,14,,,35.377145,1.329126,exact,osm_node,osm,"{""osm"":""node/9031893757""}",node,9031893757,"[""etus-tiaret""]","[""etus-tiaret-26"",""etus-tiaret-31""]",point_in_wilaya,"[""platform""]",bus_stop,platform
|
|
@@ -39894,8 +39894,8 @@
|
|
|
39894
39894
|
"geometry": {
|
|
39895
39895
|
"type": "Point",
|
|
39896
39896
|
"coordinates": [
|
|
39897
|
-
3.
|
|
39898
|
-
36.
|
|
39897
|
+
3.0569475,
|
|
39898
|
+
36.7599996
|
|
39899
39899
|
]
|
|
39900
39900
|
},
|
|
39901
39901
|
"properties": {
|
|
@@ -39906,9 +39906,9 @@
|
|
|
39906
39906
|
"wilaya_code": "16",
|
|
39907
39907
|
"commune_code": null,
|
|
39908
39908
|
"commune": null,
|
|
39909
|
-
"lat": 36.
|
|
39910
|
-
"lng": 3.
|
|
39911
|
-
"geo_precision": "
|
|
39909
|
+
"lat": 36.7599996,
|
|
39910
|
+
"lng": 3.0569475,
|
|
39911
|
+
"geo_precision": "exact",
|
|
39912
39912
|
"geo_method": "osm_node",
|
|
39913
39913
|
"source": "osm",
|
|
39914
39914
|
"osm_type": "node",
|
|
@@ -40840,8 +40840,8 @@
|
|
|
40840
40840
|
"geometry": {
|
|
40841
40841
|
"type": "Point",
|
|
40842
40842
|
"coordinates": [
|
|
40843
|
-
3.
|
|
40844
|
-
36.
|
|
40843
|
+
3.1047857,
|
|
40844
|
+
36.7329998
|
|
40845
40845
|
]
|
|
40846
40846
|
},
|
|
40847
40847
|
"properties": {
|
|
@@ -40852,9 +40852,9 @@
|
|
|
40852
40852
|
"wilaya_code": "16",
|
|
40853
40853
|
"commune_code": null,
|
|
40854
40854
|
"commune": null,
|
|
40855
|
-
"lat": 36.
|
|
40856
|
-
"lng": 3.
|
|
40857
|
-
"geo_precision": "
|
|
40855
|
+
"lat": 36.7329998,
|
|
40856
|
+
"lng": 3.1047857,
|
|
40857
|
+
"geo_precision": "exact",
|
|
40858
40858
|
"geo_method": "osm_node",
|
|
40859
40859
|
"source": "osm",
|
|
40860
40860
|
"osm_type": "node",
|
|
@@ -53576,7 +53576,7 @@
|
|
|
53576
53576
|
"geometry": {
|
|
53577
53577
|
"type": "Point",
|
|
53578
53578
|
"coordinates": [
|
|
53579
|
-
3.
|
|
53579
|
+
3.0559999,
|
|
53580
53580
|
36.789114
|
|
53581
53581
|
]
|
|
53582
53582
|
},
|
|
@@ -53589,8 +53589,8 @@
|
|
|
53589
53589
|
"commune_code": null,
|
|
53590
53590
|
"commune": null,
|
|
53591
53591
|
"lat": 36.789114,
|
|
53592
|
-
"lng": 3.
|
|
53593
|
-
"geo_precision": "
|
|
53592
|
+
"lng": 3.0559999,
|
|
53593
|
+
"geo_precision": "exact",
|
|
53594
53594
|
"geo_method": "osm_node",
|
|
53595
53595
|
"source": "osm",
|
|
53596
53596
|
"osm_type": "node",
|
|
@@ -60897,8 +60897,8 @@
|
|
|
60897
60897
|
"geometry": {
|
|
60898
60898
|
"type": "Point",
|
|
60899
60899
|
"coordinates": [
|
|
60900
|
-
1.
|
|
60901
|
-
35.
|
|
60900
|
+
1.3119995,
|
|
60901
|
+
35.3613829
|
|
60902
60902
|
]
|
|
60903
60903
|
},
|
|
60904
60904
|
"properties": {
|
|
@@ -60909,9 +60909,9 @@
|
|
|
60909
60909
|
"wilaya_code": "14",
|
|
60910
60910
|
"commune_code": null,
|
|
60911
60911
|
"commune": null,
|
|
60912
|
-
"lat": 35.
|
|
60913
|
-
"lng": 1.
|
|
60914
|
-
"geo_precision": "
|
|
60912
|
+
"lat": 35.3613829,
|
|
60913
|
+
"lng": 1.3119995,
|
|
60914
|
+
"geo_precision": "exact",
|
|
60915
60915
|
"geo_method": "osm_node",
|
|
60916
60916
|
"source": "osm",
|
|
60917
60917
|
"osm_type": "node",
|
package/data/metadata.json
CHANGED
package/data/stations.json
CHANGED
|
@@ -30285,9 +30285,9 @@
|
|
|
30285
30285
|
"wilaya_code": "16",
|
|
30286
30286
|
"commune_code": null,
|
|
30287
30287
|
"commune": null,
|
|
30288
|
-
"lat": 36.
|
|
30289
|
-
"lng": 3.
|
|
30290
|
-
"geo_precision": "
|
|
30288
|
+
"lat": 36.7599996,
|
|
30289
|
+
"lng": 3.0569475,
|
|
30290
|
+
"geo_precision": "exact",
|
|
30291
30291
|
"geo_method": "osm_node",
|
|
30292
30292
|
"source": "osm",
|
|
30293
30293
|
"osm_type": "node",
|
|
@@ -31011,9 +31011,9 @@
|
|
|
31011
31011
|
"wilaya_code": "16",
|
|
31012
31012
|
"commune_code": null,
|
|
31013
31013
|
"commune": null,
|
|
31014
|
-
"lat": 36.
|
|
31015
|
-
"lng": 3.
|
|
31016
|
-
"geo_precision": "
|
|
31014
|
+
"lat": 36.7329998,
|
|
31015
|
+
"lng": 3.1047857,
|
|
31016
|
+
"geo_precision": "exact",
|
|
31017
31017
|
"geo_method": "osm_node",
|
|
31018
31018
|
"source": "osm",
|
|
31019
31019
|
"osm_type": "node",
|
|
@@ -40688,8 +40688,8 @@
|
|
|
40688
40688
|
"commune_code": null,
|
|
40689
40689
|
"commune": null,
|
|
40690
40690
|
"lat": 36.789114,
|
|
40691
|
-
"lng": 3.
|
|
40692
|
-
"geo_precision": "
|
|
40691
|
+
"lng": 3.0559999,
|
|
40692
|
+
"geo_precision": "exact",
|
|
40693
40693
|
"geo_method": "osm_node",
|
|
40694
40694
|
"source": "osm",
|
|
40695
40695
|
"osm_type": "node",
|
|
@@ -46238,9 +46238,9 @@
|
|
|
46238
46238
|
"wilaya_code": "14",
|
|
46239
46239
|
"commune_code": null,
|
|
46240
46240
|
"commune": null,
|
|
46241
|
-
"lat": 35.
|
|
46242
|
-
"lng": 1.
|
|
46243
|
-
"geo_precision": "
|
|
46241
|
+
"lat": 35.3613829,
|
|
46242
|
+
"lng": 1.3119995,
|
|
46243
|
+
"geo_precision": "exact",
|
|
46244
46244
|
"geo_method": "osm_node",
|
|
46245
46245
|
"source": "osm",
|
|
46246
46246
|
"osm_type": "node",
|
package/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
// @geoalgeria/buses: loaders for Algeria's reviewed urban/suburban bus networks.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const DATA = join(dirname(fileURLToPath(import.meta.url)), "data");
|
|
7
|
-
const load = (p) => JSON.parse(readFileSync(join(DATA, p), "utf-8"));
|
|
2
|
+
// `load` reaches each data file by a literal path a bundler can follow; a path
|
|
3
|
+
// built at runtime builds fine and then throws ENOENT (loaders.cjs, #290).
|
|
4
|
+
import load from "./loaders.cjs";
|
|
8
5
|
|
|
9
6
|
export const lines = () => load("lines.json"); // urban bus lines (v1: ETUSA/Alger)
|
|
10
7
|
export const lineById = (id) => lines().find((l) => l.id === id) ?? null;
|
package/loaders.cjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// GENERATED by scripts/generate-loaders.mjs. Do not edit by hand.
|
|
2
|
+
//
|
|
3
|
+
// One loader per data file, each with a literal path a bundler can follow. The
|
|
4
|
+
// package is ESM, where there is no lazy synchronous JSON import, so the
|
|
5
|
+
// requires live here in CommonJS: `index.js` imports this as its `load`
|
|
6
|
+
// helper and its call sites are unchanged. A `require` inside a function stays
|
|
7
|
+
// lazy, so importing @geoalgeria/buses still parses nothing.
|
|
8
|
+
//
|
|
9
|
+
// Why, and what each bundler does with it: scripts/check-bundlers.mjs
|
|
10
|
+
// (issues #276 and #290).
|
|
11
|
+
|
|
12
|
+
const LOADERS = {
|
|
13
|
+
"directions.json": () => require("./data/directions.json"),
|
|
14
|
+
"lines.json": () => require("./data/lines.json"),
|
|
15
|
+
"metadata.json": () => require("./data/metadata.json"),
|
|
16
|
+
"operators.json": () => require("./data/operators.json"),
|
|
17
|
+
"shapes.json": () => require("./data/shapes.json"),
|
|
18
|
+
"station-memberships.json": () => require("./data/station-memberships.json"),
|
|
19
|
+
"stations.json": () => require("./data/stations.json"),
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Read one of this package's data files.
|
|
24
|
+
*
|
|
25
|
+
* Every call answers with a fresh copy, exactly as the `JSON.parse` this
|
|
26
|
+
* replaced did, so a caller that sorts or splices what it gets cannot reorder
|
|
27
|
+
* another caller's data. The copy is what makes that true: the `require` cache
|
|
28
|
+
* holds one parse of the file, and a bundler inlines it as a single shared
|
|
29
|
+
* object, so handing that out directly would be shared mutable state.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} file file name under `data/`, e.g. "directions.json"
|
|
32
|
+
* @returns {any} the parsed JSON
|
|
33
|
+
*/
|
|
34
|
+
module.exports = function load(file) {
|
|
35
|
+
const loader = LOADERS[file];
|
|
36
|
+
if (!loader) throw new Error(`@geoalgeria/buses: no data file "${file}" in this package`);
|
|
37
|
+
return structuredClone(loader());
|
|
38
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoalgeria/buses",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reviewed urban and suburban bus data for Algeria: 184 Lines, 76 shapes, 128 Directions and 1,603 Stations across 16 Operators.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"data/**/*.csv",
|
|
20
20
|
"data/**/*.geojson",
|
|
21
21
|
"types/",
|
|
22
|
+
"loaders.cjs",
|
|
22
23
|
"index.js"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|