Skip to content

Commit

Permalink
Merge pull request #338 from BaseAdresseNationale/mmortier/modifiedCs…
Browse files Browse the repository at this point in the history
…vWithIds

modification du fichier csv historique avec ids
  • Loading branch information
mmortier authored Dec 8, 2023
2 parents 504e133 + 0a51cad commit de0dc97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/formatters/csv-legacy.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ function adresseToRow(a) {
function adresseToRowWithIds(a) {
return {
id: a.cleInterop,
id_ban_adresse: a.banId || '',
id_ban_toponyme: a.banIdMainCommonToponym || '',
id_ban_district: a.banIdDistrict || '',
id_fantoir: getIdFantoirField(a.codeCommune, a.idVoie) || '',
numero: a.numero,
rep: a.suffixe || '',
Expand All @@ -88,15 +85,16 @@ function adresseToRowWithIds(a) {
source_nom_voie: getSource(a.sourceNomVoie) || '',

certification_commune: a.certifie ? '1' : '0',
cad_parcelles: a.parcelles ? a.parcelles.join('|') : ''
cad_parcelles: a.parcelles ? a.parcelles.join('|') : '',
id_ban_adresse: a.banId || '',
id_ban_toponyme: a.banIdMainCommonToponym || '',
id_ban_commune: a.banIdDistrict || '',
}
}

function lieuDitToRowWithIds(a) {
return {
id: a.idVoie,
id_ban_toponyme: a.banId || '',
id_ban_district: a.banIdDistrict || '',
nom_lieu_dit: a.nomVoie,
code_postal: a.codePostal || '',
code_insee: a.codeCommune,
Expand All @@ -110,7 +108,9 @@ function lieuDitToRowWithIds(a) {
lat: a.lat || '',

source_position: a.source,
source_nom_voie: a.source
source_nom_voie: a.source,
id_ban_toponyme: a.banId || '',
id_ban_commune: a.banIdDistrict || ''
}
}

Expand Down

0 comments on commit de0dc97

Please sign in to comment.