From ce9ca4b846fb3b78431976a303dc1519aeaacfce Mon Sep 17 00:00:00 2001 From: mmortier Date: Fri, 28 Jul 2023 11:58:16 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20du=20banId=20sur=20les=20communes,=20le?= =?UTF-8?q?s=20voies=20et=20les=20num=C3=A9ros=20=C3=A0=20l'export=20addok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/distribute/writers/addok.cjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/distribute/writers/addok.cjs b/lib/distribute/writers/addok.cjs index bb6f8518..8c35229a 100644 --- a/lib/distribute/writers/addok.cjs +++ b/lib/distribute/writers/addok.cjs @@ -39,9 +39,11 @@ function getCenterProps(commune, numeros) { function buildMunicipality(commune, numeros = []) { const {x, y, lon, lat} = getCenterProps(commune, numeros) + const districtIdBan = numeros[0].banIdDistrict || null return { id: commune.code, + banId: districtIdBan, type: 'municipality', name: commune.nom, postcode: commune.codesPostaux, @@ -63,6 +65,7 @@ function buildStreet(voie, forceAddOldCity = false) { [numero.numero || '0', numero.suffixe].filter(Boolean).join(''), { id: numero.cleInterop, + banId: numero.banId || null, x: numero.x, y: numero.y, lon: numero.lon, @@ -85,6 +88,7 @@ function computeCommonVoieProps(voie, forceAddOldCity = false) { return { id: voie.idVoie, + banId: voie.banId || null, name: forceAddOldCity && voie.nomAncienneCommune ? `${voie.nomVoie} (${voie.nomAncienneCommune})` : voie.nomVoie, postcode: voie.codePostal, citycode: codeCommuneArrondissement ? [commune.code, codeCommuneArrondissement] : compact([commune.code, voie.codeAncienneCommune]),