improve mapping of values

This commit is contained in:
Tykayn 2023-07-29 23:16:36 +02:00 committed by tykayn
parent 9eaef4dbf9
commit 8db9dc296e
6 changed files with 7935 additions and 5926 deletions

View File

@ -2,6 +2,9 @@
* convertisseur de données de bornes de recharge électrique à partir de données Chargemap et open data Etalab * convertisseur de données de bornes de recharge électrique à partir de données Chargemap et open data Etalab
*/ */
import fs from 'node-fs' import fs from 'node-fs'
import minimist from 'minimist'
let mini_arguments = minimist(process.argv.slice(2))
let show_debug = 0 let show_debug = 0
@ -18,7 +21,11 @@ let boundingBoxCoordinates = {
let filterCoordinates = true let filterCoordinates = true
let enableFilterOnDepartment = true let enableFilterOnDepartment = true
let filterDepartment = 974 let filterDepartment = 91
if (mini_arguments['department']) {
filterDepartment = mini_arguments['department']
}
let filterZipCode = new RegExp(`^${filterDepartment}`) let filterZipCode = new RegExp(`^${filterDepartment}`)
let filterZipCodeAdresse = new RegExp(` ${filterDepartment}`) let filterZipCodeAdresse = new RegExp(` ${filterDepartment}`)
let filteredName = '' let filteredName = ''

File diff suppressed because one or more lines are too long

View File

@ -5,9 +5,18 @@
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"minimist": "^1.2.8",
"node-fs": "^0.1.7" "node-fs": "^0.1.7"
} }
}, },
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/node-fs": { "node_modules/node-fs": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz", "resolved": "https://registry.npmjs.org/node-fs/-/node-fs-0.1.7.tgz",

View File

@ -1,5 +1,6 @@
{ {
"dependencies": { "dependencies": {
"minimist": "^1.2.8",
"node-fs": "^0.1.7" "node-fs": "^0.1.7"
} }
} }